language-parser-0.1.0.0

Safe HaskellNone
LanguageHaskell2010

Database.Translation

Synopsis

Documentation

addTranslationFromAlt Source #

Arguments

:: (MonadIO m, MonadLogger m) 
=> WordText

Text of source word

-> PartOfSpeech

PartOfSpeech of source word

-> LanguageName

LanguageName of source word

-> LanguageName

LanguageName of translation word

-> Text

Text of the translation

-> Maybe Comment

Maybe Text of translation comment

-> AppT m (Maybe (Key Translation)) 

The addTranslationFromAlt function inserts new translation not to a word.

>>> runSQLAction $ addTranslationFromAlt "bhrentos" Noun Titan English "animal horned" Nothing
Just (TranslationKey {unTranslationKey = SqlBackendKey {unSqlBackendKey = 19980}})

addTranslationFromTo Source #

Arguments

:: (MonadIO m, MonadLogger m) 
=> WordText

Text of source word

-> PartOfSpeech

PartOfSpeech of source word

-> LanguageName

LanguageName of source word

-> WordText

Text of translation word

-> PartOfSpeech

PartOfSpeech of translation word

-> LanguageName

LanguageName of translation word

-> Maybe Comment

Maybe Text of translation comment

-> AppT m (Maybe (Key Translation))

Key Translation if inserted succsesfully

The addTranslationFromTo function inserts new translation to a existing word.

>>> runSQLAction $ addTranslationFromTo "kibil" Noun Khuzdûl "silver" Noun English (Just "metal")
Just (TranslationKey {unTranslationKey = SqlBackendKey {unSqlBackendKey = 19980}})