3X      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ None`/Wraps the passed action into a named savepoint This connection manager always returns the same connection. This constraint is useful when performing operations which make sense only within one connection, for example, nested savepoints.. Connection manager provides connection to the passed function handles transations. Manager can be a connection itself, a pool, Snaplet in Snap, foundation datatype in Yesod, etc. @Extracts the connection from manager and opens the transaction. Extracts the connection. -Datatypes which can be converted directly to . The no-value parameter DbDescriptor db => Proxy dbf allows conversion depend the database details while keeping it pure. A type which has an instance of ' should be an instance of superclasses  and   as well. bRepresents all datatypes that map into several columns. Getting values for those columns is pure. Represents all datatypes that map into a single column. Getting value for that column might require monadic actions to access other tables. Represents everything which can be put into a database. This data can be stored in multiple columns and tables. To get value of those columns we might need to access another table. That is why the result type is monadic. _Return name of the type. If it is polymorphic, the names of parameter types are separated with  symbol IConvert a value into something which can be stored in a database column. I Note that for complex datatypes it may insert them to return identifier Constructs a value from a 2. For complex datatypes it may query the database Description of value type HExpr with phantom type helps to keep type safety in complex expressions eUsed to uniformly represent fields, constants and more complex things, e.g., arithmetic expressions.  A value should be converted to  for usage in expressions -Types which are never NULL when converted to .  Consider the type Maybe (Maybe a)o. Now Nothing is stored as NULL, so we cannot distinguish between Just Nothing and Nothing which is a problem. 4 The purpose of this class is to ban the inner Maybe's. = Maybe this class can be removed when support for inner Maybe' s appears. Avoid orphan instances. HA raw value which can be stored in any backend and can be marshalled to  and from a . Creating some datatypes may require calling a function, using a special constructor, or other syntax. The string (which can have placeholders) is included into query without escaping. The recursive constructions are not allowed, i.e., [PersistValue]& cannot contain PersistCustom values. +.Datatype for incremental building SQL queries -The first argument is a flag which defines if the field names should be concatenated with the outer field name (False) or used as is which provides full control over table column names (True).  Value False should be the default value so that a datatype can be embedded without name conflict concern. The second argument list of field names and field types. / Stores name for a database type 1The reference contains either EntityDef of the parent table and name of the unique constraint. Or for tables not mapped by Groundhog schema name, table name, and list of columns i Reference to the autogenerated key of a mapped entity = (Left (entityDef, Nothing), onDelete, onUpdate) k Reference to a unique key of a mapped entity = (Left (entityDef, Just uniqueKeyName), onDelete, onUpdate) d Reference to a table that is not mapped = (Right (schema, tableName, columns), onDelete, onUpdate) 3)List table name and type of its argument 5)type, nullable, default value, reference 6BA DB data type. Naming attempts to reflect the underlying Haskell F datatypes, eg DbString instead of DbVarchar. Different databases may 1 have different representations for these types. 9 ByteString I=Defines how to treat the unique set of fields for a datatype MGUnique name and list of the field names that form a unique combination SKCreates value of unique key using the data extracted from the passed value T@Ordinal number of the unique constraint in the list returned by _ UVThis class helps type inference in cases when query does not contain any fields which 6 define the constructor, but the entity has only one.  For example, in select $ AutoKeyField ==. k^ the condition would need type annotation with constructor name only if we select a sum type. WrPhantom constructors are made instances of this class. This class should be used only by Template Haskell codegen XQReturns constructor index which can be used to get ConstructorDef from EntityDef Y Describes an entity constructor [%Number of the constructor in the ADT \Constructor name ]Autokey name if any ^&Parameter names with their named type _0Uniqueness constraints on the constructor fiels `Describes an ADT. b Entity name. )entityName (entityDef v) == persistName v cDDatabase schema for the entity table and tables of its constructors d<Named types of the instantiated polymorphic type parameters e(List of entity constructors definitions fPEither error messages or migration queries with safety flag and execution order g,Datatype names and corresponding migrations knA token which defines the DB type. For example, different monads working with Sqlite, return may Sqlite type. lIInsert a new record to a database and return its autogenerated key or () mKInsert a new record to a database. For some backends it may be faster than l. nTry to insert a record and return Right newkey. If there is a constraint violation for the given constraint, Left oldkey is returned I , where oldkey is an identifier of the record with the matching values. oTry to insert a record and return Right newkey. If there is a constraint violation for any constraint, Left oldkey is returned  , where oldkey is an identifier of the record with the matching values. Note that if several constraints are violated, a key of an arbitrary matching record is returned. peReplace a record with the given autogenerated key. Result is undefined if the record does not exist. q@Return a list of the records satisfying the condition. Example: select $ (FirstField ==. "abc" &&. SecondField >. "def") `orderBy` [Asc ThirdField] `limitTo` 100 riReturn a list of all records. Order is undefined. It is useful for datatypes with multiple constructors. s Fetch an entity from a database t2Fetch an entity from a database by its unique key u6Update the records satisfying the condition. Example: update [FirstField =. "abc"] $ FirstField ==. "def" v,Remove the records satisfying the condition wERemove the record with given key. No-op if the record does not exist x7Count total number of records satisfying the condition y4Count total number of records with all constructors z*Fetch projection of some fields. Example: 4project (SecondField, ThirdField) $ (FirstField ==. "abc" &&. SecondField >. "def") `orderBy` [Asc ThirdField] `offsetBy` 100 {XCheck database schema and create migrations for the entity and the entities it contains |Execute raw query }Execute raw query with results PType of the database default autoincremented key. For example, Sqlite has Int64 Value of this type can be used as a part of a query. For example, it can be RenderS for relational databases, or BSON for MongoDB. Name of backend aThis class helps to check that limit, offset, or order clauses are added to condition only once. 4It can be used in expressions like a regular field.  For example, delete (AutoKeyField ==. k)  or -delete (AutoKeyField ==. k ||. SomeField ==. " DUPLICATE") 8This subset of Assignable is for plain database fields. This subset of Projection instances is for things that behave like fields. Namely, they can occur in condition expressions (for example, Field and SubField) and on the left side of update statements. For example " lower(field)"y is a valid Projection, but not Field like because it cannot be on the left side. Datatypes that index PostgreSQL arrays "arr[5]" or access composites "(comp).subfield"$ are valid instances of Assignable. -Any data that can be fetched from a database It returns multiple expressions that can be transformed into values which can be selected. Difflist is used for concatenation efficiency.  It is like B. However, we cannot use it for projections in all cases. For the  instances 1 expects entity id instead of the entity values. It is used to map field to column names. It can be either a column name for a regular field of non-embedded type or a list of this field and the outer fields in reverse order. Eg, fieldChain $ SomeField ~> Tuple2_0Selector may result in [("val0", DbString), ("some", DbEmbedded False [dbType "" , dbType True])]. #Defines sort order of a result-set "Represents condition for a query. AIt allows to store autogenerated keys of one database in another 3A phantom datatype to make instance head different u (UniqueMarker v) 3A phantom datatype to make instance head different c (ConstructorMarker v) 9Key marked with this type can have value for any backend  A holder for Unique constraints <Only instances of this class can be persisted in a database NThis type is used for typesafe manipulation of separate fields of datatype v.  Each constructor in + corresponds to its field in a datatype v. F It is parametrised by constructor phantom type and field value type. A unique identifier of a value stored in a database. This may be a primary key, a constraint or unique indices. The second parameter is the key description. oThis type is the default autoincremented key for the entity. If entity does not have such key, AutoKey v = (). -This type is the default key for the entity. FIt is HFalse for entity with one constructor and HTrue for sum types. +Returns a complete description of the type Marshalls value to a list of  ready for insert to a database &Constructs the value from the list of  VReturns constructor number and a list of uniques names and corresponding field values /Is internally used by FieldLike Field instance  We could avoid this function if class FieldLike allowed FieldLike Fields Data or FieldLike (Fields Data). However that would require additional extensions in user-space code 8Accesses fields of the embedded datatypes. For example, SomeField ==. ("abc", "def"() ||. SomeField ~> Tuple2_0Selector ==. "def"   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|keep in cache query positional parameters }keep in cache query positional parameters results processing function ~  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~*)('&%$#"!   +,6BA@?>=<;:9872543`abcde-./0YZ[\]^_WXUVRSTMNOPQILKJCHGFED1fghjklmnopqrstuvwxyz{|}~iM   *)('&%$#"! +,-./0125436 BA@?>=<;:987CHGFEDILKJMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ NoneFThis class helps to shorten the type signatures of user monadic code. TProduce the migrations but not execute them. Fails when an unsafe migration occurs. BReturns either a list of errors in migration or a list of queries &Execute the migrations and log them. QExecute migrations and log them. Executes the unsafe migrations without warnings Pretty print the migrations DRun migrations and log them. Fails when an unsafe migration occurs. MRun migrations and log them. Executes the unsafe migrations without warnings No-op Prints the queries to stdout MJoins the migrations. The result is either all error messages or all queries LReturns only old elements, only new elements, and matched pairs (old, new).  The new ones exist only in datatype, the old are present only in DB, match is typically by name (the properties of the matched elements may differ). CIt helps to run database operations within your application monad. WRuns action within connection. It can handle a simple connection, a pool of them, etc. It helps to run  within a monad. 7True - support unsafe queries computation to run first ?computation to run afterward (even if an exception was raised) computation to run first (acquire resource) computation to run last (release resource) computation to run in-between 33/ None]   \None8This helper class can make type signatures more concise +Instances of this type can be converted to K. It is useful for uniform manipulation over fields, constant values, etc.  Update field Boolean "and" operator. Boolean "or" operator. FThis function more limited than (==.), but has better type inference. 3 If you want to compare your value to Nothing with (==.)2 operator, you have to write the types explicitly !myExpr ==. (Nothing :: Maybe Int). /        !"#$%&'()*+,          .        !"#$%&'()*+,NoneThis class distinguishes databases which support SQL-specific expressions. It contains ad hoc members for features whose syntax differs across the databases. Escape function, priority of the outer operator. The result is a list for the embedded data which may expand to several RenderS. !ERenders conditions for SQL backend. Returns Nothing if the fields don't have any columns. +<Returns escaped table name optionally qualified with schema ,AReturns escaped main table name optionally qualified with schema ( !escape render equals render not equals "#$%&-'()*.+,/01234567"+, !"#$%&'()*+,"!#$)%"('&+, *+," !"#$%&-'()*.+,/01234567None @vSql pieces for the create table statement that add constraints and alterations for running after the table is created JFunction schema, function name K%Statement which creates the function LITrigger schema, trigger name, table schema, table name, field name, body M=Trigger schema, trigger name, table schema, table name, body N7Trigger schema, trigger name, table schema, table name OqTable schema, table name, create statement, structure of table from DB, structure of table from datatype, alters econstraint name and reference jchild column, parent column tDCreate migration for a given entity and all entities it depends on. L The stateful Map is used to avoid duplicate migrations when an entity type $ occurs several times in a datatype T-. Schema name / Schema name  Table name 0 Schema name  Table name 1 Schema name  Trigger name 2 Schema name Function name 3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs89tmigrate entity  migrate list initial entity uvwFrom database From datatype :;<x=yzN-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyzNmnopqrDEFGHfghijklabcdeZ`_^]\[QYXWVUTSRIPONMLKJ3456789:;<=>?@ABC-./012stuvwxyz-./0123456789:;<=>?@ABCDEFGHIPONMLKJQYXWVUTSRZ`_^]\[abcdefghijklmnopqrs89tuvw:;<x=yzNoneConvert field to an arithmetic value. It is kept for compatibility with older Groundhog versions and can be replaced with liftExpr. {|}~ {|}~ }~{|{|}~None>Ireceives constructor number and row of values from the constructor table escape function to run query #condition to compare with constant escape function to run query #condition to compare with constant ?@>AB  ?@>AB NonePSjklmnopqrstuvwxyz{|}~        >jklmnopqrstuvwxyz{|}~S     C  !"#$$%&'()**+,-./0123456778899:;<=>>?@ABCDEFGHIJKLMNOPQRSTUUVWXYZ[\]^_``abcdeffghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-../0123456789:;<=>>?@ABCDEFGHIHJKLMNOPQJRSTUVWXXYZ[\\]^_`abbcdefghijklmnopqrstuxvwy}uz{t|~svwxyz{|}~                                                                                                                 !"#$%&'()groundhog-0.4.0.2Database.Groundhog.Generic.SqlDatabase.Groundhog.CoreDatabase.Groundhog.GenericDatabase.Groundhog.Expression$Database.Groundhog.Generic.Migration(Database.Groundhog.Generic.Sql.Functions0Database.Groundhog.Generic.PersistBackendHelpersdelimDatabase.Groundhog.InstancesDatabase.Groundhogbase Data.String fromString Data.Monoid<> SavepointwithConnSavepointSingleConnectionManagerConnectionManagerwithConnwithConnNoTransactionPrimitivePersistFieldtoPrimitivePersistValuefromPrimitivePersistValuePurePersistFieldtoPurePersistValuesfromPurePersistValuesSinglePersistFieldtoSinglePersistValuefromSinglePersistValue PersistField persistNametoPersistValuesfromPersistValuesdbTypeExpr UntypedExprExprPure ExprFieldExprRaw NeverNullZT PersistValue PersistCustom PersistNullPersistZonedTimePersistUTCTimePersistTimeOfDay PersistDay PersistBool PersistDouble PersistInt64PersistByteString PersistStringUtf8 EmbeddedDef OtherTypeDefParentTableReferenceDbTypeDbList DbEmbeddedDbTypePrimitive DbAutoKeyDbOtherDbBlobDbDayTimeZoned DbDayTimeDbTimeDbDayDbBoolDbRealDbInt64DbInt32DbStringReferenceActionType SetDefaultSetNullCascadeRestrictNoAction UniqueType UniquePrimary UniqueIndexUniqueConstraint UniqueDef uniqueName uniqueType uniqueFields IsUniqueKey extractUnique uniqueNum EntityConstrentityConstrNum ConstructorphantomConstrNumConstructorDef constrNum constrNameconstrAutoKeyName constrParams constrUniques EntityDef entityName entitySchema typeParams constructorsSingleMigrationNamedMigrations Migration RowPopperPersistBackend PhantomDbinsertinsert_insertBy insertByAllreplaceselect selectAllgetgetByupdatedelete deleteByKeycountcountAllprojectmigrate executeRawqueryRaw insertListgetList DbDescriptor AutoKeyTypeQueryRaw backendName DbPersist unDbPersistHasSelectOptionsHasLimit HasOffsetHasOrdergetSelectOptions SelectOptions condOptions limitOptions offsetOptions orderOptionsRestrictionHolder AutoKeyFieldSubFieldEmbeddedSelector selectorNum FieldLike fieldChain Assignable ProjectionprojectionExprsprojectionResult FieldChainOrderDescAscUpdate ExprRelationLeGeLtGtNeEqCond CondEmptyCondRawCompareNotOrAndHTrueHFalseProxy KeyForBackend UniqueMarkerConstructorMarkerBackendSpecificUnique PersistEntityFieldKeyAutoKey DefaultKey IsSumType entityDeftoEntityPersistValuesfromEntityPersistValues getUniquesentityFieldChain~>limitTooffsetByorderBy runDbPersistfromUtf8HasConn PSFieldDef psFieldName psDbFieldName psDbTypeName psExprName psEmbeddedDefpsDefaultValuepsReferenceParentcreateMigration getQueriesexecuteMigrationexecuteMigrationUnsafeprintMigration runMigrationrunMigrationUnsafesilentMigrationLoggerdefaultMigrationLoggermergeMigrations failMessagefinallybracket onExceptionapplyDbTypeSettingsprimToPersistValueprimFromPersistValueprimToPurePersistValuesprimFromPurePersistValuesprimToSinglePersistValueprimFromSinglePersistValuepureToPersistValuepureFromPersistValuesingleToPersistValuesingleFromPersistValuetoSinglePersistValueUniquefromSinglePersistValueUniquetoPersistValuesUniquefromPersistValuesUniquetoSinglePersistValueAutoKeyfromSinglePersistValueAutoKey replaceOnefindOne matchElements haveSameElems mapAllRows phantomDbisSimplerunDb runDbConn withSavepoint Unifiable ExpressionOf ExpressiontoExpr=.&&.||.==./=.<.<=.>.>=.isFieldNothingSqlDbappendSnippetRenderSgetQuery getValues StringLikefromChar renderExprrenderExprPriorityrenderExprExtendedrenderPersistValueparensoperatorfunction renderCond renderChaindefaultShowPrim renderOrders renderFieldsflatten commasJoin intercalateS renderUpdatesliftExpr tableName mainTableNameSchemaAnalyzer listTableslistTableTriggers analyzeTableanalyzeTriggeranalyzeFunction MigrationPack compareTypes compareRefs compareUniqscompareDefaultsmigTriggerOnDeletemigTriggerOnUpdate migConstrescapeprimaryKeyTypeName mainTableIddefaultPriorityaddUniquesReferences showColumn showAlterDbdefaultReferenceActionType UniqueDef' uniqueDefName uniqueDefTypeuniqueDefColumnsAlterDB DropFunctionCreateOrReplaceFunctionAddTriggerOnUpdateAddTriggerOnDelete DropTrigger AlterTableAddTable AlterColumn AddColumn DropColumn DropReference AddReference DropIndexDropConstraint AddUnique UpdateValue NoDefaultDefaultNotNullIsNullType TableInfo tableColumns tableUniquestableReferences ReferencereferencedTableSchemareferencedTableNamereferencedColumnsreferenceOnDeletereferenceOnUpdateColumncolNamecolNullcolType colDefault mkColumnsmigrateRecursively migrateEntity migrateList getAltersdefaultMigConstrshowReferenceActionreadReferenceActionin_notIn_likenotLikeloweruppertoArith$fEqExpr $fShowExpr$fOrdZT$fEqZT $fShowUtf8$fEqUtf8$fShowOtherTypeDef$fEqOtherTypeDef$fMonadLoggerDbPersist$fMonadBaseControlIODbPersist$fMonadTransControlDbPersist$fMonadBaseIODbPersist"$fHasSelectOptionsSelectOptionsdbr$fHasSelectOptionsConddbrexecuteMigration'executeMigrateapplyReferencesSettings$fHasConnmcmconn EntityConstr'entityConstrNum' readHelper$fEntityConstr'HTruec$fEntityConstr'HFalsec$fEntityConstrvc$fFieldLikeudbrk$$fFieldLikeFielddbRestrictionHoldera'$fFieldLikeSubFielddbRestrictionHoldera+$fFieldLikeAutoKeyFielddbRestrictionHoldera$fAssignableudbra'$fAssignableFielddbra'$fAssignableSubFielddbra'$fAssignableAutoKeyFielddbra'$fProjection(,,,,)dbr(,,,,)$fProjection(,,,)dbr(,,,)$fProjection(,,)dbr(,,)$fProjection(,)dbr(,)$fProjectionudbrk!$fProjectioncdbRestrictionHolderv,$fProjectionAutoKeyFielddbRestrictionHoldera$fProjectionExprdbra($fProjectionSubFielddbRestrictionHoldera%$fProjectionFielddbRestrictionHoldera$fPersistFieldKeyForBackend$fPersistField(,,,,)$fPersistField(,,,)$fPersistField(,,)$fPersistField(,)$fPersistField()$fPersistField[]$fPersistFieldMaybe$fPersistFieldZonedTime$fPersistFieldUTCTime$fPersistFieldTimeOfDay$fPersistFieldDay$fPersistFieldBool$fPersistFieldDouble$fPersistFieldWord64$fPersistFieldWord32$fPersistFieldWord16$fPersistFieldWord8$fPersistFieldInt64$fPersistFieldInt32$fPersistFieldInt16$fPersistFieldInt8$fPersistFieldInt$fPersistFieldText$fPersistField[]0$fPersistFieldByteString$fNeverNullKeyForBackend$fNeverNullKey$fNeverNullUTCTime$fNeverNullTimeOfDay$fNeverNullDay$fNeverNullBool$fNeverNullDouble$fNeverNullInt64$fNeverNullInt$fNeverNullByteString$fNeverNullText $fNeverNull[]$fSinglePersistFielda$fPurePersistFielda$$fPrimitivePersistFieldKeyForBackend$fPrimitivePersistFieldMaybe $fPrimitivePersistFieldZonedTime$fPrimitivePersistFieldUTCTime $fPrimitivePersistFieldTimeOfDay$fPrimitivePersistFieldDay$fPrimitivePersistFieldBool$fPrimitivePersistFieldDouble$fPrimitivePersistFieldWord64$fPrimitivePersistFieldWord32$fPrimitivePersistFieldWord16$fPrimitivePersistFieldWord8$fPrimitivePersistFieldInt64$fPrimitivePersistFieldInt32$fPrimitivePersistFieldInt16$fPrimitivePersistFieldInt8$fPrimitivePersistFieldInt!$fPrimitivePersistFieldByteString$fPrimitivePersistFieldText$fPrimitivePersistField[]$fPurePersistField(,,,,)$fPurePersistField(,,,)$fPurePersistField(,,)$fPurePersistField(,)$fPurePersistField()$fEmbedded(,,,,)$fEmbedded(,,,)$fEmbedded(,,) $fEmbedded(,)Tuple5_4SelectorTuple5_3SelectorTuple5_2SelectorTuple5_1SelectorTuple5_0SelectorTuple4_3SelectorTuple4_2SelectorTuple4_1SelectorTuple4_0SelectorTuple3_2SelectorTuple3_1SelectorTuple3_0SelectorTuple2_1SelectorTuple2_0Selector NormalizeKeyTypeEqNormalizeValue Normalize$fNormalizeKeyHFalsear$fNormalizeKeyHTrueKeyr$fTypeEqxxHTrue $fTypeEqxyb$fNormalizeValuear$fNormalizeValueKeyr$fNormalizeValueMayber$fNormalizeHTruetr$fNormalizeHFalsetr$fNormalizeHTrueAutoKeyFieldr $fNormalizeHFalseAutoKeyField(,)$fNormalizeHTrueur$fNormalizeHFalseu(,)$fNormalizeHTrueExprr$fNormalizeHFalseExpr(,)$fNormalizeHTrueSubFieldr$fNormalizeHFalseSubField(,)$fNormalizeHTrueFieldr$fNormalizeHFalseField(,) $fUnifiableab $fUnifiableaa$fExpressiondbr'u$fExpressiondbr'AutoKeyField$fExpressiondbr'SubField$fExpressiondbr'Field$fExpressiondb'r'Expr$fExpressiondbra$fExpressionOfdbraa'flattenP liftExpr' qualifySchema $fNumExpr$fStringLike[]$fStringLikeRenderS$fIsStringRenderS$fMonoidRenderS$fStringLikeUtf8$fIsStringUtf8 $fMonoidUtf8 mkReferencestraverseDbType migrateColumn migrateUniq dropUnique mkDeletesmkEntitygetConstructorTypesconstrIdtoEntityPersistValues'dbInt64