u      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~    !"   !"  !"     !" !"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  #$%&'((#$%&'#$%$%&'(_)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. -;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. 0123456789:;<=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 A, but returns  when the record  couldn'2t be inserted because of a uniqueness constraint. @AHCreate a new record in the database, returning an automatically created $ key (in SQL an auto-increment id). B9Create a new record in the database using the given key. C3Put the record in the database with the given key.  Unlike D*, if a record with the given key does not + exist then a new record will be inserted. D2Replace 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 B or C in  these cases. EDDelete a specific record by identifier. Does nothing if record does  not exist. F*Get a record by identifier, if available. G: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 HG 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 HG., 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  "Database.Persist.GenericSql.rawSql (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. HIJKLMNOPHA 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. Q*Parameters: val and datatype of the field RS)Unique keys in existence on this entity. TUVWXYZ[\].A value which can be marshalled to and from a l. ^_`abCA 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. cdefghi1FIXME 8-byte integer; should be renamed SqlInt64 jklHA raw value which can be stored in any backend and can be marshalled to  and from a ]. m(intended especially for MongoDB backend nopqrstuvwxyz{|}~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 LK is returned as . A modification of =, which takes the P itself instead  of a S! value. Returns a value matching one of the unique keys. This 9 function makes the most sense on entities with a single S  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 9 if the entity would be unique, and could thus safely be  A ed; returns  on a conflict. ])*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~]lxwvutsrqponmbkjihgfedc]^_`aPQTRSUVWXYZ[\@ABCDEF<=>?2;:9876543NO01y~}|{zKLMGHIJ)*+,-./])*+,-./*+,-./0112 ;:98765433456789:;<=>?=>?@ABCDEFABCDEFGHIJHIJKLMLMNOOP QTRSUVWXYZ[\QRSTUVWXYZ[\]^_`a^_`ab kjihgfedccdefghijkl xwvutsrqponmmnopqrstuvwxy~}|{zz{|}~ :table name, column names, either 1 or 2 statements to run create a new connection connection count 1Create the list of columns for the given entity.   !Same as 2, but returns a list of the SQL commands executed % instead of printing them to stderr. " is silent? #Perform a database commit. Perform a database rollback. $1Class for data types that may be retrived from a   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. A single column (see ). Any ] may be  used here, including l (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 HGs# (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 HGs! 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 ^ 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. /0123456789:GHIJKLMKLMGHIJ # 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. 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 LK/s of all records matching the given criterion. <The total number of records fulfilling the given criterion. Call select" but return the result as a list. ### ;<=>include table name? include table name? ?include table name? include WHERE? @AEquivalent to -, but instead of getting the connection from  the environment inside a  monad, provide an explicit  ). This can allow you to use the returned Source in an  arbitrary monad. include the table name  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 (/=) 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 (/=) 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 (/=) 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 (/=) 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 (/=) 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 $$ BCDEFN<=>?@ABCDEFGHIJKLMPQRSTUVWXYZ[\]^_`aN]^_`aPQTRSUVWXYZ[\@ABCDEF<=>?KLMGHIJG !!"#$$%&'()*+,--./0123456789:;<=>?@ABCDEFGHIJKLMNOPPQRSSTUUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  !" # $ % &  ' ( ) *   + , - . / 0 1 2 3 4 5 6 7 (  8 9  :;<=>persistent-0.7.0.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.SqlDatabase.Persistnullable deprecateapE UniqueDef uniqueHaskell uniqueDBName uniqueFieldsFieldDef fieldHaskellfieldDB fieldType fieldAttrsAttr FieldType unFieldTypeDBNameunDBName HaskellName unHaskellName ExtraLine EntityDef entityHaskellentityDBentityID entityAttrs entityFields entityUniques entityDerives entityExtraPersistSettings psToDBNameupperCaseSettingslowerCaseSettingsparse PersistConfigPersistConfigBackendPersistConfigPool loadConfigapplyEnvcreatePoolConfigrunPool DeleteCascade deleteCascade PersistFilterBackendSpecificFilterNotInInLeGeLtGtNeEq PersistUniquegetBydeleteBy insertUnique PersistStoreinsert insertKeyrepsertreplacedeletegetEntity entityKey entityValKeyunKeySomePersistField PersistEntity EntityFieldPersistEntityBackendUniquepersistFieldDef entityDeftoPersistFieldsfromPersistValues halfDefinedpersistUniqueToFieldNamespersistUniqueToValuespersistUniqueKeyspersistIdField PersistFieldtoPersistValuefromPersistValuesqlType isNullableSqlTypeSqlBlob SqlDayTimeSqlTimeSqlDaySqlBoolSqlReal SqlIntegerSqlInt32 SqlString PersistValuePersistObjectId PersistMap PersistList PersistNullPersistUTCTimePersistTimeOfDay PersistDay PersistBool PersistDouble PersistInt64PersistByteString PersistTextPersistExceptionPersistMongoDBUnsupportedPersistMongoDBErrorPersistForeignConstraintUnmetPersistInvalidFieldPersistMarshalError PersistErrorinsertBy getByValue belongsTo belongsToJustgetJust checkUniqueColumncNamecNullcTypecDefault cReference StatementfinalizeresetexecutewithStmt Connectionprepare insertSqlstmtMapclose migrateSqlbegincommitC rollbackC escapeNamenoLimit withSqlPool createSqlPool withSqlConn mkColumns SqlPersist unSqlPersistgetStmtgetStmt' MigrationparseMigrationparseMigration'printMigration getMigration runMigrationrunMigrationSilentrunMigrationUnsafemigratecommitrollbackSingleunSingleConnectionPool runSqlPool runSqlConnrawSqlUpdate updateField updateValue updateUpdate PersistUpdateDivideMultiplySubtractAddAssign SelectOptLimitToOffsetByDescAscFilterFilterOr FilterAnd filterField filterValue filterFilter PersistQueryupdate updateWhere deleteWhere selectSource selectFirst selectKeyscount selectListlimitOffsetOrderupdateFieldDefdeleteCascadeWheregetFiltsValuesfilterClauseNoWhereselectSourceConndummyFromFilts orderClause=.+=.-=.*=./=.==.!=.<.<=.>.>=.<-./<-.||. SelectOneMany somFilterOne somOrderOne somFilterMany somOrderMany somFilterKeys somGetKeysomIncludeNoMatchRunJoinResultrunJoin selectOneManyLine lineIndenttokensTokenSpacestokenizeempty removeSpacesparse' mkEntityDef splitExtrastakeCols takeUniqs takeDerives aeson-0.6.0.0Data.Aeson.Types.InternalValuebase Data.MaybeNothing Data.EitherLeftRightghc-prim GHC.TypesTrueFalse++showclose'resolveTableNamerefNameCautiousMigrationSqlexecute'allSql unsafeSqlsafeSql runMigration'executeMigrateRawSql rawSqlColsrawSqlColCountReasonrawSqlProcessRow insrepHelper dummyFromKeydummyFromUnique onExceptionfrom3to3from4to4from5to5from6to6from7to7from8to8updatePersistValue filterClausefilterClauseHelperfromPersistValuesIdaddTable colsPlusId filterName