r      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                      None Safe-InferredNoneoptional module, name #  !"#$%#  !"#$%# !"#$ %    !"#$%None A line. We don')t care about spaces in the middle of the  line. Also, we don')t care about the ammount of indentation. A token used by the parser.  Token tok is token tok already unquoted. Spaces n are n consecutive spaces. +@Parses a quasi-quoted syntax into a list of entity definitions. Tokenize a string. <A string of tokens is empty when it has only spaces. There  can't be two consecutive , so this takes O(1) time. =Remove leading spaces and remove spaces in the middle of the  tokens. 6Divide lines into blocks and make entity definitions.  Construct an entity definition.  !"&'(#$%&')*+name entity attributes indented lines ()*+,&'()*++&'()* !"&'(#&%$')*+()*+,None,KRepresents a value containing all the configuration options for a specific N backend. This abstraction makes it easier to write code that can easily swap  backends. / Load the config settings from a - , most likely taken from a YAML  config file. 0;Modify the config settings based on environment variables. 1ACreate a new connection pool based on the given config settings. 2<Run a database action by taking a connection from the pool. @GGet a record by unique key, if available. Returns also the identifier. ABDelete a specific record by unique key. Does nothing if no record  matches. BLike D, but returns . when the record  couldn'2t be inserted because of a uniqueness constraint. DHCreate a new record in the database, returning an automatically created $ key (in SQL an auto-increment id). E9Create a new record in the database using the given key. F3Put the record in the database with the given key.  Unlike G*, if a record with the given key does not + exist then a new record will be inserted. G2Replace the record in the database with the given < key. Note that the result is undefined if such record does  not exist, so you must use E or F in  these cases. HDDelete a specific record by identifier. Does nothing if record does  not exist. I*Get a record by identifier, if available. J:Datatype that represents an entity, with both its key and  its Haskell representation. 7When using the an SQL-based backend (such as SQLite or  PostgreSQL), an J may take any number of columns > depending on how many fields it has. In order to reconstruct " your entity on the Haskell side,  persistent needs all of < your entity columns and in the right order. Note that you  don'&t need to worry about this when using  persistent's API : since everything is handled correctly behind the scenes. =However, if you want to issue a raw SQL command that returns  an J., then you have to be careful with the column  order. While you could use SELECT Entity.* WHERE ... and < that would work most of the time, there are times when the = order of the columns on your database is different from the  order that  persistent( expects (for example, if you add a new ? field in the middle of you entity definition and then use the  migration code --  persistent! will expect the column to be in < the middle, but your DBMS will put it as the last column). > So, instead of using a query like the one above, you may use    (from the  Database.Persist.GenericSql module) with its /entity  selection placeholder/ (a double question mark ?? ). Using  rawSql$ the query above must be written as SELECT ?? WHERE  ... Then rawSql will replace ?? with the list of all ? columns that we need from your entity in the right order. If ' your query returns two entities (i.e. (Entity backend a,  Entity backend b)), then you must you use SELECT ??, ??  WHERE ... , and so on. SHA single database entity. For example, if writing a blog application, a L blog entry would be an entry, containing fields such as title and content. T*Parameters: val and datatype of the field V)Unique keys in existence on this entity. `.A value which can be marshalled to and from a q. eCA SQL data type. Naming attempts to reflect the underlying Haskell L datatypes, eg SqlString instead of SqlVarchar. Different SQL databases may . have different translations for these types. fa backend-specific name qHA raw value which can be stored in any backend and can be marshalled to  and from a `. r(intended especially for MongoDB backend Avoid orphan instances. Generic Exception JInsert a value, checking for conflicts with any unique constraints. If a 5 duplicate exists in the database, it is returned as /. Otherwise, the  new N is returned as 0. A modification of @, which takes the S itself instead  of a V! value. Returns a value matching one of the unique keys. This 9 function makes the most sense on entities with a single V  constructor. same as belongsTo, but uses getJust# and therefore is similarly unsafe 8Same as get, but for a non-null (not Maybe) foreign key J Unsafe unless your database is enforcing that the foreign key is valid KCheck whether there are any conflicts for unique keys with this entity and $ existing entities in the database. Returns 19 if the entity would be unique, and could thus safely be  D ed; returns 2 on a conflict. ,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYe,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~eq~}|{zyxwvutsreponmlkjihgf`abcdSTWUVXYZ[\]^_CDEFGHI?@AB5>=<;:9876QR34NOPJKLM,-./012>,-./012345 >=<;:9876?@ABCDEFGHIJKLMNOPQRS TWUVXYZ[\]^_`abcde ponmlkjihgfq ~}|{zyxwvutsr3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYNoneCtable name, column names, id name, either 1 or 2 statements to run 1Create the list of columns for the given entity. %create a new connection connection count Z[\""  Z[\None]^_`abcdef]^_`abcdefNoneSame as 2, but returns a list of the SQL commands executed % instead of printing them to stderr. Perform a database commit. Perform a database rollback. ghijklm is silent? n ghijklmn None1Class for data types that may be retrived from a   query. o9Number of columns that this data type needs and the list  of substitutions for SELECT placeholders ??. p7A string telling the user why the column count is what  it is. q2Transform a row of the result into the data type. A single column (see ). Any ` may be  used here, including q (which does not do any  processing). JGet a connection from the pool, run the given action, and then return the  connection to the pool. 8Execute a raw SQL statement and return its results as a  list. If you' re using Js# (which is quite likely), then you  must4 use entity selection placeholders (double question  mark, ?? ). These ??$ placeholders are then replaced for : the names of the columns that we need for your entities.  You'll receive an error if you don't use the placeholders.  Please see the Js! documentation for more details. 0You may put value placeholders (question marks, ? ) in your @ SQL query. These placeholders are then replaced by the values > you pass on the second parameter, already correctly escaped.  You may want to use a to help you constructing  the placeholder values.  Since you'&re giving a raw SQL statement, you don' t get any " guarantees regarding safety. If  is not able to parse > the results of your query back, then an exception is raised. : However, most common problems are mitigated by using the  entity selection placeholder ??, and you shouldn' t see any  error at all if you' re not using . r Since 1.0.1. ,opqstuvwxy+SQL statement, possibly with placeholders. !Values to fill the placeholders. z{|}~rJKLMNOPNOPJKLM'opqstuvwxyz{|}~r None  Filters which are available for select,  and  4. Each filter constructor specifies the field being G filtered on, the type of comparison applied (equals, not equals, etc) & and the argument for the comparison. 4convenient for internal use, not needed for the API /Update individual fields on a specific record. @Update individual fields on a specific record, and retrieve the " updated value from the database. HNote that this function will throw an exception if the given key is not  found in the database. EUpdate individual fields on any record matching the given criterion. 1Delete all records matching the given criterion. EGet all records matching the given criterion in the specified order.  Returns also the identifiers. ,get just the first record for the criterion Get the N/s of all records matching the given criterion. <The total number of records fulfilling the given criterion. Call " but return the result as a list. Call " but return the result as a list. )''  NoneEquivalent to -, but instead of getting the connection from  the environment inside a  monad, provide an explicit  ). This can allow you to use the returned  in an  arbitrary monad. include table name? include table name? include table name? include table name? include WHERE? include the table name  Noneassign a field a value  assign a field by addition (+=) #assign a field by subtraction (-=) &assign a field by multiplication (*=) assign a field by division (/=) In NotIn the OR of two lists of filters && None                      NoneNoneO?@ABCDEFGHIJKLMNOPSTUVWXYZ[\]^_`abcdO`abcdSTWUVXYZ[\]^_CDEFGHI?@ABNOPJKLM !""#$$%&''()*+,-./01223456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUUVWXXYZZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                             !"#$%&'()*(+,(+-./0./123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm n o p q h r s t u 4 5 v w x y z { | } ~                       s h   4 5  4persistent-1.0.2.1Database.Persist.UtilDatabase.Persist.TH.LibraryDatabase.Persist.EntityDefDatabase.Persist.QuasiDatabase.Persist.Store$Database.Persist.GenericSql.InternalDatabase.Persist.GenericSql.Raw%Database.Persist.GenericSql.MigrationDatabase.Persist.GenericSqlDatabase.Persist.Query.Internal!Database.Persist.Query.GenericSqlDatabase.Persist.QueryDatabase.Persist.Query.JoinDatabase.Persist.Query.Join.SqlrawSqlDatabase.Persistnullable deprecateapE UniqueDef uniqueHaskell uniqueDBName uniqueFieldsFieldDef fieldHaskellfieldDB fieldType fieldAttrs FieldTypeFTListFTApp FTTypeConAttrDBNameunDBName HaskellName unHaskellName ExtraLine EntityDef entityHaskellentityDBentityID entityAttrs entityFields entityUniques entityDerives entityExtra entitySumstripIdPersistSettings psToDBNameupperCaseSettingslowerCaseSettingsparse PersistConfigPersistConfigBackendPersistConfigPool loadConfigapplyEnvcreatePoolConfigrunPool DeleteCascade deleteCascade PersistFilterBackendSpecificFilterNotInInLeGeLtGtNeEq PersistUniquegetBydeleteBy insertUnique PersistStoreinsert insertKeyrepsertreplacedeletegetEntity entityKey entityValKeyunKeySomePersistField PersistEntity EntityFieldPersistEntityBackendUniquepersistFieldDef entityDeftoPersistFieldsfromPersistValues halfDefinedpersistUniqueToFieldNamespersistUniqueToValuespersistUniqueKeyspersistIdField PersistFieldtoPersistValuefromPersistValuesqlType isNullableSqlTypeSqlOtherSqlBlobSqlDayTimeZoned SqlDayTimeSqlTimeSqlDaySqlBoolSqlRealSqlInt64SqlInt32 SqlString PersistValuePersistObjectId PersistMap PersistList PersistNullPersistZonedTimePersistUTCTimePersistTimeOfDay PersistDay PersistBool PersistDouble PersistInt64PersistByteString PersistTextZTPersistExceptionPersistMongoDBUnsupportedPersistMongoDBErrorPersistForeignConstraintUnmetPersistInvalidFieldPersistMarshalError PersistError getPersistMapinsertBy getByValue belongsTo belongsToJustgetJust checkUnique listToJSON mapToJSONColumncNamecNullcTypecDefaultcMaxLen cReference StatementfinalizeresetexecutewithStmt Connectionprepare insertSqlstmtMapclose migrateSqlbegincommitC rollbackC escapeNamenoLimitInsertSqlResult ISRInsertGet ISRSingle withSqlPool createSqlPool withSqlConn mkColumnslogSQL SqlPersist unSqlPersistgetStmtgetStmt' MigrationparseMigrationparseMigration'printMigration getMigration runMigrationrunMigrationSilentrunMigrationUnsafemigratecommitrollbackRawSqlSingleunSingleConnectionPool runSqlPool runSqlConnUpdate updateField updateValue updateUpdate PersistUpdateDivideMultiplySubtractAddAssign SelectOptLimitToOffsetByDescAscFilterFilterOr FilterAnd filterField filterValue filterFilter PersistQueryupdate updateGet updateWhere deleteWhere selectSource selectFirst selectKeyscountUpdateGetException KeyNotFound selectListselectKeysListlimitOffsetOrderupdateFieldDefdeleteCascadeWheregetFiltsValuesfilterClauseNoWherefilterClauseNoWhereOrNullselectSourceConndummyFromFilts orderClause=.+=.-=.*=./=.==.!=.<.<=.>.>=.<-./<-.||. SelectOneMany somFilterOne somOrderOne somFilterMany somOrderMany somFilterKeys somGetKeysomIncludeNoMatchRunJoinResultrunJoin selectOneManyLineTokenSpacestokenizeempty removeSpaces parseLines mkEntityDef lineIndenttokens ParseState PSSuccessPSFailPSDoneparseFieldType splitExtrastakeCols getDbName takeUniqs takeDerives aeson-0.6.0.2Data.Aeson.Types.InternalValuebase Data.MaybeNothing Data.EitherLeftRightghc-prim GHC.TypesTrueFalsefromPersistListfromPersistMap++show$fPersistFieldPersistValue $fFromJSONKey $fToJSONKey$fPersistFieldSomePersistField$fPersistFieldMap$fPersistField(,)$fPersistFieldSet$fPersistField[]$fPersistFieldMaybe$fPersistFieldZonedTime$fPersistFieldUTCTime$fPersistFieldTimeOfDay$fPersistFieldDay$fPersistFieldBool$fPersistFieldDouble$fPersistFieldWord64$fPersistFieldWord32$fPersistFieldWord16$fPersistFieldWord8$fPersistFieldInt64$fPersistFieldInt32$fPersistFieldInt16$fPersistFieldInt8$fPersistFieldInt$fPersistFieldMarkupM$fPersistFieldText$fPersistFieldByteString$fPersistField[]0$fFromJSONPersistValue$fToJSONPersistValue$fPathPiecePersistValue$fOrdZT$fEqZT$fErrorPersistException$fExceptionPersistExceptionclose'resolveTableNamerefNameMonadSqlPersist askSqlConn$fMonadLoggerSqlPersist$fMonadSqlPersistResourceT$fMonadSqlPersistSqlPersist$fMonadResourceSqlPersist$fMonadTransControlSqlPersist#$fMonadBaseControlbackendSqlPersist$fMonadBasebackendSqlPersist$fMonadThrowSqlPersistCautiousMigrationSqlexecute'allSql unsafeSqlsafeSql runMigration'executeMigrate rawSqlColsrawSqlColCountReasonrawSqlProcessRow $fRawSqlMaybe insrepHelper dummyFromKeydummyFromUnique onException extractMaybefrom3to3from4to4from5to5from6to6from7to7from8to8$fRawSql(,,,,,,,)$fRawSql(,,,,,,)$fRawSql(,,,,,)$fRawSql(,,,,) $fRawSql(,,,) $fRawSql(,,) $fRawSql(,)$fRawSqlEntity$fRawSqlSingle$fPersistUniqueSqlPersistm$fPersistStoreSqlPersistm$fPathPieceKey$fExceptionUpdateGetException$fShowUpdateGetExceptionconduit-0.5.4.1Data.Conduit.InternalSourceOrNullOrNullNo OrNullYesupdatePersistValue filterClausefilterClauseHelper$fPersistQuerySqlPersistm"$fRunJoinSelectOneManybackendmonadfromPersistValuesIdaddTable colsPlusId filterName$fRunJoinSelectOneMany