#(      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'NoneKRepresents 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. ;Modify the config settings based on environment variables. ACreate a new connection pool based on the given config settings. <Run a database action by taking a connection from the pool. ))NoneCA 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. a backend-specific name *HA raw value which can be stored in any backend and can be marshalled to  and from a  PersistField. +(intended especially for MongoDB backend 9Avoid orphan instances. AGeneric Exception Jname of the field Nuser annotations for a field O/a strict field in the data type. Default: true P1indicates that the field uses an embedded entity TOptional module and name. hThe reason why a field is nullable is very important. A % field that is nullable because of a Maybe tag will have its  type changed from A to Maybe A. OTOH, a field that is  nullable because of a nullable tag will remain with the same  type. nA n+ should be used as a field type whenever a ? uniqueness constraint should guarantee that a certain kind of @ record may appear at most once, but other kinds of records may  appear any number of times. NOTE: You need to mark any  Checkmark fields as nullable  (see the following example). For example, suppose there's a Location entity that $ represents where a user has lived:    Location  user UserId  name Text  current Checkmark nullable  UniqueLocation user current The UniqueLocation! constraint allows any number of  o Locations to be current. However, there may be  at most one current Location per user (i.e., either zero  or one per user). 8This data type works because of the way that SQL treats  NULL4able fields within uniqueness constraints. The SQL  standard says that NULL values should be considered  different, so we represent o as SQL NULL, thus  allowing any number of o records. On the other hand,  we represent p as TRUE, so the uniqueness constraint  will disallow more than one p record. Note:0 There may be DBMSs that do not respect the SQL  standard's treatment of NULL values on uniqueness : constraints, please check if this data type works before  relying on it. The SQL BOOLEAN type is used because it's the smallest data ) type available. Note that we never use FALSE, just TRUE  and NULL. Provides the same behavior Maybe () would if  () was a valid  PersistField. o,When used on a uniqueness constraint, there  may be any number of o records. p,When used on a uniqueness constraint, there  may be at most one p record. w  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq*+,-./012345k  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq!    )('&%$#"! *876543210/.-,+9:;A@?>=<BCDEFGHIJKLMNOPQTSRUVWXYZ[\] ^_`abcdefghjikmlnpoq*+,-./012345Nonet.A value which can be marshalled to and from a *. 'rstuv67w89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVrstuvw$rstuv67w89:;<=>?@ABCDEFGHIJKLMNOPQRSTUV Nonex: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 x 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 x., 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. |Helper wrapper, equivalent to "Key (PersistEntityBackend val) val.  Since 1.1.0 } Filters which are available for select,  updateWhere and   deleteWhere4. 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 HA 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. *Parameters: val and datatype of the field )Unique keys in existence on this entity. 'xyz{|}~WX%xyz{|}~ xyz{|}~ WX None*Get a record by identifier, if available. HCreate a new record in the database, returning an automatically created $ key (in SQL an auto-increment id). Same as  , but doesn' t return a Key. )Create multiple records in the database. ? SQL backends currently use the slow default implementation of   mapM insert 9Create a new record in the database using the given key. 3Put the record in the database with the given key.  Unlike *, if a record with the given key does not + exist then a new record will be inserted. 2Replace 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 ' insertKey or  in  these cases. DDelete a specific record by identifier. Does nothing if record does  not exist. YZ[\]^_`abcdefgh  YZ[\]^_`abcdefgh NoneNone1Queries against unique keys (other than the id). HPlease read the general Persistent documentation to learn how to create  Unique keys. w SQL backends automatically create uniqueness constraints, but for MongoDB you must place a unique index on the field. GGet a record by unique key, if available. Returns also the identifier. BDelete a specific record by unique key. Does nothing if no record  matches. Like , but returns i when the record  couldn'2t be inserted because of a uniqueness constraint. jKCheck whether there are any conflicts for unique keys with this entity and $ existing entities in the database. Returns k9 if the entity would be unique, and could thus safely be   ed; returns l on a conflict. jmnopqrstuvwxyz{jmnopqrstuvwxyz{None  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrsxyz{|}~npokmlhji]^_`abcdefg\YZ[VWXUQTSRHIJKLMNOPBCDEFG;A@?>=<9:*876543210/.-,+q)('&%$#"!   rs}~|xyz{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. 5Whether fields are by default strict. Default value: True.  Since 1.2 @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/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 |/s of all records matching the given criterion. <The total number of records fulfilling the given criterion.  NoneA single column (see rawSql). Any  PersistField may be  used here, including * (which does not do any  processing). Ctable name, column names, id name, either 1 or 2 statements to run 62 None1Create the list of columns for the given entity. None0tuv0tuvNoneJInsert a value, checking for conflicts with any unique constraints. If a 5 duplicate exists in the database, it is returned as . Otherwise, the  new 'Key is returned as . A modification of , which takes the  itself instead  of a ! value. Returns a value matching one of the unique keys. This 9 function makes the most sense on entities with a single   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 assign 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 Call " but return the result as a list. Call " but return the result as a list.   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~wNone 1Class for data types that may be retrived from a rawSql  query.  9Number of columns that this data type needs and the list  of substitutions for SELECT placeholders ??.  7A string telling the user why the column count is what  it is.  2Transform a row of the result into the data type.  Since 1.0.1. M          H     None8Execute a raw SQL statement and return its results as a  list. If you' re using xs# (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 xs! 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 u 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 . +SQL statement, possibly with placeholders. !Values to fill the placeholders. NoneJGet a connection from the pool, run the given action, and then return the  connection to the pool. create a new connection connection count None!Same as  2, but returns a list of the SQL commands executed % instead of printing them to stderr. JSort the alter DB statements so tables are created before constraints are  added.  ! is silent? "# !"# !"#NoneNone$Same as +, but returns the number of rows affected.  Since 1.1.5 %Same as +, but returns the number of rows affected.  Since 1.1.5 $%include table name? include WHERE?  include table name?  include the table name   $% $%    None  None&4Commit the current transaction and begin a new one.  Since 1.2.0 '7Roll back the current transaction and begin a new one.  Since 1.2.0 &'#  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'P      !"#$%&'&' !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRRSTUVWXYZZ[\]^__`abcdefghijkllmnnopqqrstuvwxyz{|}~   4      )                      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^ _ ` a b c d e f g h i j k l m n o pqrstuvwuvxyz{|}~qq      persistent-1.2.1.2Database.Persist.ClassDatabase.Persist.TypesDatabase.PersistDatabase.Persist.QuasiDatabase.Persist.Sql$Database.Persist.Class.PersistConfigDatabase.Persist.Types.Base#Database.Persist.Class.PersistField$Database.Persist.Class.PersistEntityDatabase.Persist.GenericSqlrawSql#Database.Persist.Class.PersistStore$Database.Persist.Class.DeleteCascade$Database.Persist.Class.PersistUnique#Database.Persist.Class.PersistQueryDatabase.Persist.Sql.TypesDatabase.Persist.Sql.InternalDatabase.Persist.Sql.ClassDatabase.Persist.Sql.RawDatabase.Persist.Sql.RunDatabase.Persist.Sql.Migration(Database.Persist.Sql.Orphan.PersistStore(Database.Persist.Sql.Orphan.PersistQuery)Database.Persist.Sql.Orphan.PersistUnique PersistConfigPersistConfigBackendPersistConfigPool loadConfigapplyEnvcreatePoolConfigrunPool PersistUpdateDivideMultiplySubtractAddAssignUpdateGetException KeyNotFound PersistFilterBackendSpecificFilterNotInInLeGeLtGtNeEq KeyEntity KeyBackendKeyunKeySqlTypeSqlOtherSqlBlobSqlDayTimeZoned SqlDayTimeSqlTimeSqlDaySqlBool SqlNumericSqlRealSqlInt64SqlInt32 SqlString PersistValuePersistObjectId PersistMap PersistList PersistNullPersistZonedTimePersistUTCTimePersistTimeOfDay PersistDay PersistBoolPersistRational PersistDouble PersistInt64PersistByteString PersistTextZTPersistExceptionPersistMongoDBUnsupportedPersistMongoDBErrorPersistForeignConstraintUnmetPersistInvalidFieldPersistMarshalError PersistError UniqueDef uniqueHaskell uniqueDBName uniqueFields uniqueAttrsFieldDef fieldHaskellfieldDB fieldType fieldSqlType fieldAttrs fieldStrict fieldEmbedded FieldTypeFTListFTApp FTTypeConAttrDBNameunDBName HaskellName unHaskellName ExtraLine EntityDef entityHaskellentityDBentityID entityAttrs entityFields entityUniques entityDerives entityExtra entitySum WhyNullableByNullableAttr ByMaybeAttr IsNullable NotNullableNullable CheckmarkInactiveActivefromPersistValueTextSomePersistField PersistFieldtoPersistValuefromPersistValue getPersistMapEntity entityKey entityValFilter BackendFilterFilterOr FilterAnd filterField filterValue filterFilter SelectOptLimitToOffsetByDescAscUpdate updateField updateValue updateUpdate PersistEntity EntityFieldPersistEntityBackendUniquepersistFieldDef entityDeftoPersistFieldsfromPersistValuespersistUniqueToFieldNamespersistUniqueToValuespersistUniqueKeyspersistIdField fieldLens PersistStorePersistMonadBackendgetinsertinsert_ insertMany insertKeyrepsertreplacedelete DeleteCascade deleteCascade PersistUniquegetBydeleteBy insertUniquePersistSettings psToDBNamepsStrictFieldsupperCaseSettingslowerCaseSettingsparsestripIdnullable PersistQueryupdate updateGet updateWhere deleteWhere selectSource selectFirst selectKeyscountSingleunSingleConnectionPool MigrationCautiousMigrationSql SqlPersistM SqlPersist SqlPersistT unSqlPersistT SqlBackendPersistentSqlExceptionCouldn'tGetSQLConnectionStatementAlreadyFinalizedColumncNamecNullcSqlTypecDefaultcMaxLen cReference Statement stmtFinalize stmtReset stmtExecute stmtQuery Connection connPrepare connInsertSql connStmtMap connCloseconnMigrateSql connBegin connCommit connRollbackconnEscapeName connNoLimit connRDBMSInsertSqlResult ISRInsertGet ISRSingle mkColumnsinsertBy getByValue belongsTo belongsToJustgetJust=.+=.-=.*=./=.==.!=.<.<=.>.>=.<-./<-.||. selectListselectKeysListdeleteCascadeWhere listToJSON mapToJSONlimitOffsetOrderPersistFieldSqlsqlTypeRawSql rawSqlColsrawSqlColCountReasonrawSqlProcessRowMonadSqlPersist askSqlConnrawQuery rawExecuterawExecuteCount getStmtConn runSqlPool runSqlConnrunSqlPersistMrunSqlPersistMPool withSqlPool createSqlPool withSqlConnclose'parseMigrationparseMigration'printMigration getMigration runMigrationrunMigrationSilentrunMigrationUnsafemigratedeleteWhereCountupdateWhereCounttransactionSavetransactionUndo aeson-0.6.1.0Data.Aeson.Types.InternalValue$fPersistConfigEither$fExceptionUpdateGetException$fShowUpdateGetException$fFromJSONKeyBackend$fToJSONKeyBackend$fFromJSONPersistValue$fToJSONPersistValue$fPathPiecePersistValue$fOrdZT$fEqZT$fErrorPersistException$fExceptionPersistException$fPathPieceCheckmarkfromPersistListfromPersistMap$fPersistFieldCheckmark$fPersistFieldSomePersistField$fPersistFieldPersistValue$fPersistFieldMap$fPersistField(,)$fPersistFieldSet$fPersistField[]$fPersistFieldMaybe$fPersistFieldZonedTime$fPersistFieldUTCTime$fPersistFieldTimeOfDay$fPersistFieldDay$fPersistFieldBool$fPersistFieldRatio$fPersistFieldFixed$fPersistFieldDouble$fPersistFieldWord64$fPersistFieldWord32$fPersistFieldWord16$fPersistFieldWord8$fPersistFieldWord$fPersistFieldInt64$fPersistFieldInt32$fPersistFieldInt16$fPersistFieldInt8$fPersistFieldInt$fPersistFieldMarkupM$fPersistFieldText$fPersistFieldText0$fPersistFieldByteString$fPersistField[]0$fFromJSONEntity$fToJSONEntity$fPersistStoreWriterT$fPersistStoreStateT$fPersistStoreRWST$fPersistStoreRWST0$fPersistStoreWriterT0$fPersistStoreConduitM$fPersistStorePipe$fPersistStoreResourceT$fPersistStoreStateT0$fPersistStoreContT$fPersistStoreReaderT$fPersistStoreErrorT$fPersistStoreMaybeT$fPersistStoreListT$fPersistStoreIdentityT$fPersistStoreLoggingTbase Data.MaybeNothing checkUniqueghc-prim GHC.TypesTrueFalse$fPersistUniqueWriterT$fPersistUniqueStateT$fPersistUniqueRWST$fPersistUniqueRWST0$fPersistUniqueWriterT0$fPersistUniquePipe$fPersistUniqueResourceT$fPersistUniqueStateT0$fPersistUniqueContT$fPersistUniqueReaderT$fPersistUniqueErrorT$fPersistUniqueMaybeT$fPersistUniqueListT$fPersistUniqueIdentityT$fPersistUniqueLoggingTLineTokenSpacestokenizeempty removeSpaces parseLines mkEntityDef lineIndenttokens ParseState PSSuccessPSFailPSDoneparseFieldType splitExtrastakeCols getDbName takeUniqs takeDerives$fPersistQueryWriterT$fPersistQueryStateT$fPersistQueryRWST$fPersistQueryRWST0$fPersistQueryWriterT0$fPersistQueryConduitM$fPersistQueryPipe$fPersistQueryResourceT$fPersistQueryStateT0$fPersistQueryContT$fPersistQueryReaderT$fPersistQueryErrorT$fPersistQueryMaybeT$fPersistQueryListT$fPersistQueryIdentityT$fPersistQueryLoggingT$fPathPieceKeyBackend$fMonadLoggerSqlPersistT$fMonadResourceSqlPersistT$fMonadTransControlSqlPersistT$$fMonadBaseControlbackendSqlPersistT$fMonadBasebackendSqlPersistT$fMonadThrowSqlPersistT!$fExceptionPersistentSqlExceptionStReader unStReaderStMSPunStMSPrefNameresolveTableName Data.EitherLeftRight $fRawSqlMaybefrom3to3from4to4from5to5from6to6from7to7from8to8 extractMaybe$fPersistFieldSqlRatio$fPersistFieldSqlFixed$fPersistFieldSqlCheckmark$fPersistFieldSqlPersistValue$fPersistFieldSqlMap$fPersistFieldSql(,)$fPersistFieldSqlSet$fPersistFieldSql[]$fPersistFieldSqlZonedTime$fPersistFieldSqlUTCTime$fPersistFieldSqlTimeOfDay$fPersistFieldSqlDay$fPersistFieldSqlBool$fPersistFieldSqlDouble$fPersistFieldSqlWord64$fPersistFieldSqlWord32$fPersistFieldSqlWord16$fPersistFieldSqlWord8$fPersistFieldSqlWord$fPersistFieldSqlInt64$fPersistFieldSqlInt32$fPersistFieldSqlInt16$fPersistFieldSqlInt8$fPersistFieldSqlInt$fPersistFieldSqlMarkupM$fPersistFieldSqlText$fPersistFieldSqlText0$fPersistFieldSqlByteString$fPersistFieldSql[]0$fRawSql(,,,,,,,)$fRawSql(,,,,,,)$fRawSql(,,,,,)$fRawSql(,,,,) $fRawSql(,,,) $fRawSql(,,) $fRawSql(,)$fRawSqlEntity$fRawSqlSingle$fMonadSqlPersistWriterT$fMonadSqlPersistStateT$fMonadSqlPersistRWST$fMonadSqlPersistRWST0$fMonadSqlPersistWriterT0$fMonadSqlPersistConduitM$fMonadSqlPersistPipe$fMonadSqlPersistResourceT$fMonadSqlPersistStateT0$fMonadSqlPersistContT$fMonadSqlPersistReaderT$fMonadSqlPersistErrorT$fMonadSqlPersistMaybeT$fMonadSqlPersistListT$fMonadSqlPersistIdentityT$fMonadSqlPersistLoggingT$fMonadSqlPersistSqlPersistTgetStmtsortMigrationsallSql unsafeSqlsafeSql runMigration'executeMigrate dummyFromKey insrepHelper$fPersistStoreSqlPersistTOrNullOrNullNo OrNullYesupdateFieldDefdummyFromFiltsgetFiltsValuesfilterClauseHelperupdatePersistValue filterClause orderClause$fPersistQuerySqlPersistTdummyFromUnique$fPersistUniqueSqlPersistT