!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None%&59;<=DIQR<TODO: replace with safe coercions when that hits platform-1.<TODO: replace with safe coercions when that hits platform-1.fNormalized append of two inductive tuples. Note that this will flatten any nested inductive tuples. AAn inductively defined "tuple", or heterogeneous, non-empty list. Name of a database table. Name of a database column.Add a prefix to a column name.Add a suffix to a column name.1Convert a column name into a string, with quotes.0Convert a table name into a string, with quotes.Create a column name.Create a column name.*Escape double quotes in an SQL identifier. ,Get the first element of an inductive tuple.-Get the second element of an inductive tuple.,Get the third element of an inductive tuple.-Get the fourth element of an inductive tuple.,Get the fifth element of an inductive tuple.,Get the sixth element of an inductive tuple..Get the seventh element of an inductive tuple.-Get the eighth element of an inductive tuple.,Get the ninth element of an inductive tuple.,Get the tenth element of an inductive tuple..       $        1 1Safe%&9;T WA row identifier for some table. This is the type of auto-incrementing primary keys.(Some value that is representable in SQL.An SQL literal.)6Any datatype representable in (Selda's subset of) SQL.*VFormat string used to represent date and time when talking to the database backend.+MFormat string used to represent date when talking to the database backend.,TFormat string used to represent time of day when talking to the database backend. 8Constructor tag for all literals. Used for Ord instance. 4Compare two literals of different type for equality.-GA row identifier which is guaranteed to not match any row in any table..`Is the given row identifier invalid? I.e. is it guaranteed to not match any row in any table?/Create a row identifier from an integer. A row identifier created using this function is not guaranteed to be a valid row identifier. Do not use unless you are absolutely sure what you're doing.. !"#$%&'()*+,  -./  !"#$%&'()*+, -./  !"#$%&'()*+,  -./ None 9;<=DQRT01An inductive tuple forming a table specification.1@An inductive tuple where each element is a column specification.2Column attributes such as nullability, auto increment, etc. When adding elements, make sure that they are added in the order required by SQL syntax, as this list is only sorted before being pretty-printed.8#Any SQL type which is NOT nullable.9Is the given type nullable?:Used by 9 to indicate a nullable type.;Used by 9 to indicate a nullable type.<A table column specification.=A database table. Tables are parameterized over their column types. For instance, a table containing one string and one integer, in that order, would have the type Table (Text :*: Int)L, and a table containing only a single string column would have the type  Table Text.8Table and column names may contain any character except NUL=, and be non-empty. Column names must be unique per table.!9Name of the table. NOT guaranteed to be a valid SQL name."%All table columns. Invariant: the #= list of each column is sorted and contains no duplicates.$;Does the given table have an auto-incrementing primary key?>5An error occurred when validating a database table. If this error is thrown, there is a bug in your database schema, and the particular table that triggered the error is unusable. Since validation is deterministic, this error will be thrown on every consecutive operation over the offending table.bTherefore, it is not meaningful to handle this exception in any way, just fix your bug instead.?*A non-nullable column with the given name.@&A nullable column with the given name.AMarks the given column as the table's primary key. A table may only have one primary key; marking more than one key as primary will result in > during validation.B]Automatically increment the given attribute if not specified during insert. Also adds the  PRIMARY KEY and UNIQUE attributes on the column.CAdd a uniqueness constraint to the given column. Adding a uniqueness constraint to a column that is already implied to be unique, such as a primary key, is a no-op.%9Add an attribute to a column. Not for public consumption.D(A table with the given name and columns.&Remove duplicate attributes.'.Sort a list and remove all duplicates from it.(/Sort a list, then group all identical elements.)@Ensure that there are no duplicate column names or primary keys.-0*123456789:;<+,-./0#1=2!"$>34?@ABC%D&'()5678)0*127345689:;<+,-./0#1=2!"$>34?@ABC%D&'()0*123456789:;<+,-./0#1=2!"$>34?@ABC%D&'()5678None%&9(Any type which may contain column names.:2Get all column names used in the given expression.;QUnderlying column expression type, parameterised over the type of SQL queries.<JA type-erased column, which may also be renamed. Only for internal use.(9:=>?@ABCDEFGHIJKLMNOPQ;RSTUVWXYZ[<\]^_`%9:=B>?@ACDEFGHIJKMLNOPQ;TRVUSWXYZ[<\]9:= >?@ABCDEFGHIJKLMNOPQ; RSTUVWXYZ[<\]^_` None !"%&9;QRTE1An inductive tuple of Haskell-level values (i.e. Int :*: Maybe Text() which can be inserted into a table.aeException indicating the use of a default value. If any values throwing this during evaluation of param xs, will be replaced by their default value.F(A parameter to a prepared SQL statement.H'The order in which to sort result rows.bAST for SQL queries.cType of join to perform.dA source for an SQL query."EeafFGHIJbghijklmcnodpqrstuvwxyz{|EeafFGHIJbghijklmcnodqprstEeafFGHIJbghijklmcnodpqrstuvwxyz{| NoneN Compile a  CREATE TABLE query from a table definition.}!Compile a foreign key constraint.~Compile a table column.O Compile a  DROP TABLE query. Compile an  INSERT INTO query inserting m rows with n cols each. Note that backends expect insertions to NOT have a semicolon at the end. In addition to the compiled query, this function also returns the list of parameters to be passed to the backend.PCompile a column attribute. KLMN}~OP KLMN}~OPKLMN}~OP None %&+9;DQRQA database column. A column is often a literal column table, but can also be an expression over such a column or a constant expression.RAny column tuple.S<Convert a tuple of Haskell types to a tuple of column types.TA literal expression.QRST.:=B>?@ACDEFGHIJKMLNOPQ;TRVUSWXYZ[<\]QRSTQRST None 09:;DQRUOne or more aggregate columns.VyThe results of a left join are always nullable, as there is no guarantee that all joined columns will be non-null.  JoinCols a where av is an extensible tuple is that same tuple, but in the outer query and with all elements nullable. For instance: b LeftCols (Col (Inner s) Int :*: Col (Inner s) Text) = Col s (Maybe Int) :*: Col s (Maybe Text)WNConvert one or more inner column to equivalent columns in the outer query. GOuterCols (Aggr (Inner s) a :*: Aggr (Inner s) b) = Col s a :*: Col s b, for instance.XDenotes an inner query. For aggregation, treating sequencing as the cartesian product of queries does not work well. Instead, we treat the sequencing of  aggregate{ with other queries as the cartesian product of the aggregated result of the query, a small but important difference.However, for this to work, the aggregate query must not depend on any columns in the outer product. Therefore, we let the aggregate query be parameterized over Inner s+ if the parent query is parameterized over s , to enforce this separation.YnA single aggregate column. Aggregate columns may not be used to restrict queries. When returned from an  aggregateK subquery, an aggregate column is converted into a non-aggregate column.Z+Create a named aggregate function. Like funs, this function is generally unsafe and should ONLY be used to implement missing backend-specific functionality. UVWXYZ UVWXYZUVWXYZ NoneISQL generation internal state. Contains the subqueries and static (i.e. not dependent on any subqueries) restrictions of the query currently being built, as well as a name supply for column renaming.[ An SQL query..Run a query computation from an initial state.JRun a query computation in isolation, but reusing the current name supply..Initial state: no subqueries, no restrictions.,Generate a unique name for the given column.#Get a guaranteed unique identifier.$Get a guaranteed unique column name.[[[None%& YSQL pretty-printer. The state is the list of SQL parameters to the prepared statement.O(n log n) equivalent of  nub . sortRun a pretty-printer.2Compile an SQL AST into a parameterized SQL query.#Compile a single column expression. Compile an UPATE statement. Compile a DELETE statement.Pretty-print a type name.bPretty-print a literal as a named parameter and save the name-value binding in the environment.&Generate a unique name for a subquery.Pretty-print an SQL AST.None%&9:;<=DOQRT\1Any table type that can have selectors generated.]5The inductive tuple of selectors for a table of type a.^BA column selector. Column selectors can be used together with the a and bU functions to get and set values on inductive tuples, or to indicate foreign keys._!A selector-value assignment pair.a@Get the value at the given index from the given inductive tuple.bFor each selector-value pair in the given list, on the given tuple, update the field pointed out by the selector with the corresponding value.cGenerate selector functions for the given table. Selectors can be used to access the fields of a query result tuple, avoiding the need to pattern match on the entire tuple. tbl :: Table (Int :*: Text) tbl = table "foo" $ required "bar" :*: required "baz" (tblBar :*: tblBaz) = selectors tbl q :: Query s Text q = tblBaz <$> select tbld[A pair of the table with the given name and columns, and all its selectors. For example: tbl :: Table (Int :*: Text) (tbl, tblBar :*: tblBaz) = tableWithSelectors "foo" $ required "bar" :*: required "baz" q :: Query s Text q = tblBaz <$> select tbl\]^_`abcd \]^_`abcd \]^_`abcd`2NoneeAdd a foreign key constraint to the given column, referencing the column indicated by the given table and selector. If the referenced column is not a primary key or has a uniqueness constraint, a >% will be thrown during validation.eeeNoneRemove all dead columns recursively, assuming that the given list of column names contains all names present in the final result.^Return the names of all columns in the given top-level query. Subqueries are not traversed.)Return the names of all non-output (i.e. hH) columns in the given top-level query. Subqueries are not traversed.RGet all column names appearing in the given list of (possibly complex) columns._Remove all columns but the given, named ones and aggregates, from a query's list of outputs. If we want to refer to a column in an outer query, it must have a name. If it doesn't, then it's either not referred to by an outer query, or the outer query duplicates the expression, thereby referring directly to the names of its components.iBuild the outermost query from the SQL generation state. Groups are ignored, as they are only used by  aggregate./Get all output columns from a list of SQL ASTs.None %&9:;DQRT fOAn acceptable query result type; one or more columns stitched together with :*:.Converts the given list of SqlValue1s into an tuple of well-typed results. See  querySQLiteb for example usage. The given list must contain exactly as many elements as dictated by the Res r. If the result is  a :*: b :*: cC, then the list must contain exactly three values, for instance.4Produce a list of all columns present in the result.h3Compile a query into a parameterised SQL statement.yThe types given are tailored for SQLite. To translate SQLite types into whichever types are used by your backend, use .:Compile a query using the given type translation function.hCompile a query into a parameterised SQL statement. Also returns all tables depended on by the query.i Compile an INSERT query, given the keyword representing default values in the target SQL dialect, a table and a list of items corresponding to the table.j Compile an UPDATE query. Compile a  DELETE FROM query.OCompile a query to an SQL AST. Groups are ignored, as they are only used by  aggregate. fghijType translation function.The table to update.Update function.!Predicate: update only when true. fghij fghijNone: kIQuery the given table. Result is returned as an inductive tuple, i.e. 0first :*: second :*: third <- query tableOfThree.lQuery an ad hoc table of type aK. Each element in the given list represents one row in the ad hoc table.m2Restrict the query somehow. Roughly equivalent to WHERE.niExecute a query, returning an aggregation of its results. The query must return an inductive tuple of  Aggregate columns. When  aggregatez returns, those columns are converted into non-aggregate columns, which may then be used to further restrict the query.Note that aggregate queries must not depend on outer queries, nor must they return any non-aggregate columns. Attempting to do either results in a type error.The SQL HAVING) keyword can be implemented by combining  aggregate and m: -- Find the number of people living on every address, for all addresses -- with more than one tenant: -- SELECT COUNT(name) AS c, address FROM housing GROUP BY name HAVING c > 1 numPpl = do num_tenants :*: address <- aggregate $ do _ :*: address <- select housing groupBy address return (count address :*: some address) restrict (num_tenants .> 1) return (num_tenants :*: address)o Perform a  LEFT JOIN with the current result set (i.e. the outer query) as the left hand side, and the given query as the right hand side. Like with nL, the inner (or right) query must not depend on the outer (or right) one.The given predicate over the values returned by the inner query determines for each row whether to join or not. This predicate may depend on any values from the outer query.6For instance, the following will list everyone in the peopled table together with their address if they have one; if they don't, the address field will be NULL. getAddresses :: Query s (Col s Text :*: Col s (Maybe Text)) getAddresses = do name :*: _ <- select people _ :*: address <- leftJoin (\(n :*: _) -> n .== name) (select addresses) return (name :*: address)p Perform an  INNER JOIN1 with the current result set and the given query.The actual code for any join.q#Group an aggregate query by a column. Attempting to group a non-aggregate query is a type error. An aggregate representing the grouped-by column is returned, which can be returned from the aggregate query. For instance, if you want to find out how many people have a pet at home: taggregate $ do name :*: pet_name <- select people name' <- groupBy name return (name' :*: count(pet_name) > 0)rDrop the first m rows, then get at most n2 of the remaining rows from the given subquery.sGSort the result rows in ascending or descending order on the given row. klmnoGPredicate determining which lines to join. | Right-hand query to join.pGPredicate determining which lines to join. | Right-hand query to join.qrs klmnopqrs klmnopqrsNoneTtsCast a column to another type, using whichever coercion semantics are used by the underlying SQL implementation.uA unary operation. Note that the provided function name is spliced directly into the resulting SQL query. Thus, this function should ONLY be used to implement well-defined functions that are missing from Selda's standard library, and NOT in an ad hoc manner during queries.vLike u, but with two arguments.tuv/ZtuvuvZt/tuvNone%&T Query to result mapping.UTable to query mapping, for keeping track of which queries depend on which tables.Items currently in cache.Max number of items in cache.Next cache prio to use.9Cache the given value, with the given table dependencies.5Get the cached value for the given key, if it exists.=Invalidate all items in cache that depend on the given table.5Set the maximum number of items allowed in the cache.NoneIw(The simplest form of Selda computation; x specialized to .x0Monad transformer adding Selda SQL capabilities.{(Some monad with Selda SQL capabilitites.|*Get the backend in use by the computation.}Invalidate the given table as soon as the current transaction finishes. Invalidate the table immediately if no transaction is ongoing.~Indicates the start of a new transaction. Starts bookkeeping to invalidate all tables modified during the transaction at the next call to .uIndicates the end of the current transaction. Invalidates all tables that were modified since the last call to ~), unless the transaction was rolled back.*Backend in use by the current computation.ATables modified by the current transaction. Invariant: always Just xs% during a transaction, and always Nothing when not in a transaction.4A collection of functions making up a Selda backend.Execute an SQL statement.Execute an SQL statement and return the last inserted primary key, where the primary key is auto-incrementing. Backends must take special care to make this thread-safe.cGenerate a custom column type for the column having the given Selda type and list of attributes.TThe keyword that represents the default value for auto-incrementing primary keys.A string uniquely identifying the database used by this invocation of the backend. This could be, for instance, a PostgreSQL connection string or the absolute path to an SQLite file.A function which executes a query and gives back a list of extensible tuples; one tuple per result row, and one tuple element per column.Thrown by any function in x if an error occurs.&Unable to open or connect to database.(An error occurred while executing query.HRun a Selda transformer. Backends should use this to implement their withX functions.wxyz{|}~4 !"#$%&'(*+,273456FGPwxyz{|}~4{|}~xyzwFG !"#$%&'(234567P*+, wxyz{|}~None:T?Run a query within a Selda monad. In practice, this is often a xe transformer on top of some other monad. Selda transformers are entered using backend-specific withX functions, such as  withSQLite from the SQLite backend.Insert the given values into the given table. All columns of the table must be present. If your table has an auto-incrementing primary key, use the special value defl for that column to get the auto-incrementing behavior. Returns the number of rows that were inserted.KTo insert a list of tuples into a table with auto-incrementing primary key: Tpeople :: Table (Int :*: Text :*: Int :*: Maybe Text) people = table "ppl" $ autoPrimary "id" required "name" required "age" optional "pet" main = withSQLite "my_database.sqlite" $ do insert_ people [ def :*: "Link" :*: 125 :*: Just "horse" , def :*: "Zelda" :*: 119 :*: Nothing , ... ]Note that if one or more of the inserted rows would cause a constraint violation, NO rows will be inserted; the whole insertion fails atomically.kAttempt to insert a list of rows into a table, but don't raise an error if the insertion fails. Returns True* if the insertion succeeded, otherwise False.Like k, if even one of the inserted rows would cause a constraint violation, the whole insert operation fails.Attempt to perform the given update. If no rows were updated, insert the given row. Returns the primary key of the inserted row, if the insert was performed. Calling this function on a table which does not have a primary key will return Just id on a successful insert, where idE is a row identifier guaranteed to not match any row in any table.cNote that this may perform two separate queries: one update, potentially followed by one insert.Perform the given insert, if no rows already present in the table match the given predicate. Returns the primary key of the inserted row, if the insert was performed. If called on a table which doesn't have an auto-incrementing primary key, Just id0 is always returned on successful insert, where idE is a row identifier guaranteed to not match any row in any table.Like i, but does not return anything. Use this when you really don't care about how many rows were inserted.Like , but returns the primary key of the last inserted row. Attempting to run this operation on a table without an auto-incrementing primary key will always return a row identifier that is guaranteed to not match any row in any table.Update the given table using the given update function, for all rows matching the given predicate. Returns the number of updated rows.Like 0, but doesn't return the number of updated rows.jFrom the given table, delete all rows matching the given predicate. Returns the number of deleted rows.Like 1, but does not return the number of deleted rows.%Create a table from the given schema.?Create a table from the given schema, unless it already exists.Drop the given table.#Drop the given table, if it exists.Perform the given computation atomically. If an exception is raised during its execution, the enture transaction will be rolled back, and the exception re-thrown.$Set the maximum local cache size to n. A cache size of zero disables local cache altogether. Changing the cache size will also flush all entries. Note that the cache is shared among all Selda computations running within the same process.(By default, local caching is turned off.WARNING: local caching is guaranteed to be consistent with the underlying database, ONLY under the assumption that no other process will modify it. Also note that the cache is shared between ALL Selda computations running within the same process.5Build the final result from a list of result columns.>Translate types for casts. Column attributes are ignored here.HGenerate the final result of a query from a list of untyped result rows.hRun the given computation over a table after invalidating all cached results depending on that table.%Execute a statement without a result.The table to update. Predicate.Update function.fgx{|}~None %&9:;QRT<Any container type for which we can check object membership./Is the given column contained in the given set?*Any column type that can be used with the  and  functions.Convenient shorthand for fmap (! sel) q-. The following two queries are quivalent: Yq1 = name `from` select people q2 = do person <- select people return (person ! name)0Explicitly create an inner query. Equivalent to innerJoin (const true).Sometimes it's handy, for performance reasons and otherwise, to perform a subquery and restrict only that query before adding the result of the query to the result set, instead of first adding the query to the result set and restricting the whole result set afterwards.PCreate and filter an inner query, before adding it to the current result set.q  p% is generally more efficient than *select q >>= x -> restrict (p x) >> pure x.Is the given column null? Ordering for s. Ordering for s.|The default value for a column during insertion. For an auto-incrementing primary key, the default value is the next key.Using defQ in any other context than insertion results in a runtime error. Likewise, if defV is given for a column that does not have a default value, the insertion will fail.gLift a non-nullable column to a nullable one. Useful for creating expressions over optional columns: people :: Table (Text :*: Int :*: Maybe Text) people = table "people" $ required "name" required "age" optional "pet" peopleWithCats = do name :*: _ :*: pet <- select people restrict (pet .== just "cat") return nameSQL NULL, at any type you like.Specialization of T for integers.Specialization of T for doubles.Specialization of T for text. True and false boolean literals. True and false boolean literals.The SQL LIKE operator; matches strings with % wildcards. For instance: "%gon" `like` "dragon" .== true2The number of non-null values in the given column..The average of all values in the given column.EThe greatest value in the given column. Texts are compared lexically.EThe smallest value in the given column. Texts are compared lexically.#Sum all values in the given column.4Round a value to the nearest integer. Equivalent to  roundTo 0.6Round a column to the given number of decimals places.(Calculate the length of a string column.Boolean negation.-Convert a boolean column to any numeric type..Convert an integer column to any numeric type.Convert any column to a string.+ )-.0189:;<=>?@ABCDEHIJKLMNOQRSTUVWXY[\]^_`abcdefghijklmnopqrswx{͐{>xw=[Qfg^a_`b)SRHIJ klmrs-.TYUWVXponqE01< 89;:]\Ddc?@ABeCKLMhNOij * 477444444324None%&*9:;<=DQRTIConvert a value to a Haskell type from the type's corresponding relation.FConvert a value from its Haskell type into the corresponding relation.7Compute all columns needed to represent the given type.6Create a dummy value where all fields are replaced by  unsafeCoerce'd ints. See  and  for more information.-The relation corresponding to the given type.YA dummy of some type. Encapsulated to avoid improper use, since all of its fields are d ints.1Some attribute that may be set on a table column.UA generic column attribute. Essentially a pair or a record selector over the type a and a column attribute.The relation corresponding to the given Haskell type. This relation simply corresponds to the fields in the data type, from left to right. For instance: 1data Foo = Foo { bar :: Int , baz :: Text }In this example,  Relation Foo is (Int :*: Text), as the first field of Foo has type Int, and the second has type Text.,A generic table. Needs to be unpacked using gen before use with k, , etc.:Any type which has a corresponding relation. To make a  Relational' instance for some type, simply derive .dNote that only types which have a single data constructor, and where all fields are instances of  can be used with this module. Attempting to use functions in this module with any type which doesn't obey those constraints will result in a very confusing type error.QGenerate a table from the given table name and list of column attributes. All MaybeT fields in the table's type will be represented by nullable columns, and all non-MaybeC fields fill be represented by required columns. For example: data Person = Person { id :: Int , name :: Text , age :: Int , pet :: Maybe Text } deriving Generic people :: GenTable Person people = genTable "people" [(name, autoPrimaryGen)]:This example will create a table with the column types #Int :*: Text :*: Int :*: Maybe Text?, where the first field is an auto-incrementing primary key.Convert a generic type into the corresponding database relation. A type's corresponding relation is simply the inductive tuple consisting of all of the type's fields. data Person = Person { id :: Int , name :: Text , age :: Int , pet :: Maybe Text } deriving Generic somePerson = Person 0 "Velvet" 19 Nothing (theId :*: theName :*: theAge :*: thePet) = toRel somePerson?This is mainly useful when inserting values into a table using ! and the other functions from Database.Selda.Convenient synonym for  map toRel.Re-assemble a generic type from its corresponding relation. This can be done either for ad hoc queries or for queries over generic tables: data SimplePerson = SimplePerson { name :: Text , age :: Int } deriving Generic demoPerson :: SimplePerson demoPerson = fromRel ("Miyu" :*: 10) adhoc :: Table (Text :*: Int) adhoc = table "adhoc" $ required "name" required "age" getPersons1 :: MonadSelda m => m [SimplePerson] getPersons1 = map fromRel <$> query (select adhoc) generic :: GenTable SimplePerson generic = genTable "generic" [] getPersons2 :: MonadSelda m => m [SimplePerson] getPersons2 = map fromRel <$> query (select (gen generic)) Applying toReld to an inductive tuple which isn't the corresponding relation of the return type is a type error.Convenient synonym for  map fromRel.Like A, but accepts a generic table and its corresponding data type.Like >, but accepts a generic table and its corresponding data type.Like >, but accepts a generic table and its corresponding data type.,A primary key which does not auto-increment.!An auto-incrementing primary key.A table-unique value.@A foreign key constraint referencing the given table and column.hExtract all column names from the given type. If the type is not a record, the columns will be named col_1, col_2, etc.!Create a dummy of the given type.FGet the selector identifier of the given selector for the given dummy..# !"#$$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^ _ ` ` a b c d e f g h i j k l m n o p q r s tuvwxyz{|}~     %& !1"#$%&'()*+,-./0123456789:;<=V>??@ABWXCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ja8LZbcdefghijk l m n o p l m q r s t u v w x % y z { | } ~                          r                t :w$selda-0.1.7.0-DhZg8cMc9gB3D54sgzSL5hDatabase.Selda.GenericDatabase.Selda.BackendDatabase.SeldaDatabase.Selda.UnsafeDatabase.Selda.TypesDatabase.Selda.SqlTypeDatabase.Selda.TableDatabase.Selda.ExpDatabase.Selda.SQLDatabase.Selda.Table.CompileDatabase.Selda.ColumnDatabase.Selda.InnerDatabase.Selda.Query.TypeDatabase.Selda.SQL.PrintDatabase.Selda.SelectorsDatabase.Selda.Table.ForeignDatabase.Selda.TransformDatabase.Selda.CompileDatabase.Selda.QueryDatabase.Selda.CachingDatabase.Selda.Frontendbase GHC.GenericsGenericControl.Monad.IO.ClassliftIOMonadIO#text-1.2.2.1-9Yh8rJoh8fO2JMLWffT3QsData.Text.InternalTextAppendapp:++:TupHead:*: TableNameColNamefirstsecondthirdfourthfifthsixthseventheighthninthtenthRowIDSqlValueSqlIntSqlFloat SqlStringSqlBoolSqlNullLitLTextLIntLDoubleLBool LDateTimeLDateLTimeLJustLNullLCustomSqlTypesqlDateTimeFormat sqlDateFormat sqlTimeFormat invalidRowIdisInvalidRowId unsafeRowId TableSpecColSpecsColAttrPrimary AutoIncrementRequiredOptionalUniqueNonNull IsNullable NotNullableNullableColSpecTableValidationErrorrequiredoptionalprimary autoPrimaryuniquetableInsertParamOrderAscDescOnErrorFailIgnorecompileCreateTablecompileDropTablecompileColAttrColColumnsColsliteral AggregatesLeftCols OuterColsInnerAggraggrQuery HasSelectors SelectorsSelector Assignment:=!with selectorstableWithSelectorsfkResultRescompile compileInsert compileUpdateselect selectValuesrestrict aggregateleftJoin innerJoingroupBylimitordercastfunfun2SeldaMSeldaTSunS MonadSelda seldaBackendinvalidateTablebeginTransactionendTransaction SeldaBackendrunStmt runStmtWithPK customColTypedefaultKeyword dbIdentifier QueryRunner SeldaErrorDbErrorSqlError runSeldaT$fMonadSeldaSeldaT$fExceptionSeldaError$fShowSeldaError$fEqSeldaError$fFunctorSeldaT$fApplicativeSeldaT $fMonadSeldaT$fMonadIOSeldaT$fMonadThrowSeldaT$fMonadCatchSeldaT$fMonadMaskSeldaT$fMonadTransSeldaTqueryinsert tryInsertupsertinsert_ insertWithPKupdateupdate_ deleteFrom deleteFrom_ createTabletryCreateTable dropTable tryDropTable transaction setLocalCacheSetisInMinMaxfrominnersuchThat.==./=.>.<.>=.<=isNull.&&.|| ascending descendingdefjustnull_intfloattexttruefalselikecountavgmax_min_sum_round_roundTolength_not_fromBoolfromInttoString $fSetQuery$fSet[] $fMinMaxMaybe $fMinMaxText $fMinMaxa AttributeGenAttr:-RelationGenTablegen RelationalgenTabletoReltoRelsfromRelfromRelsinsertGenWithPK insertGen insertGen_ primaryGenautoPrimaryGen uniqueGenfkGen $fGFromRelM1 $fGFromRelK1 $fGFromRel:*:$fGRelation:*: $fGRelationK1 $fGRelationM1$fGRelationM10$fGRelationM11 $fTraitsa $fTraitsMaybe unsafeToListunsafeFromList addColPrefix addColSuffix fromColName fromTableName mkColName mkTableName escapeQuotesToDyntoDynsfromDynsUnsafetupHead$fToDyna $fToDyn:*: $fAppendab $fAppend:*:c$fTupa$fTup:*:$fOrd:*:$fEq:*: $fShow:*:$fHashableTableName litConTagcompLitmkLitsqlTypefromSql defaultValue$fSqlTypeMaybe$fSqlTypeTimeOfDay $fSqlTypeDay$fSqlTypeUTCTime $fSqlTypeBool $fSqlTypeText$fSqlTypeDouble $fSqlTypeInt$fSqlTypeRowID $fShowRowID $fShowLit$fShowSqlValue$fOrdLit$fEqLit tableName tableColscolAttrstableHasAutoPKaddAttrtidysnubsoupvalidate mergeSpecsunCSColInfocolNamecolTypecolFKsnewCol $fTableSpeca$fTableSpec:*: $fNonNulla$fExceptionValidationErrorNames allNamesInExpSomeColBinOpGtLtGteLteEqNeqAndOrAddSubMulDivLikeUnOpAbsNotNegSgnIsNullFunTblColFun2CastAggrExInListInQuerySomeNamed$fNamesSomeCol $fNamesExp $fNames[]DefaultValueExceptionSQLJoinType SqlSourceparamscolssource restrictsgroupsorderinglimits InnerJoinLeftJoinProductJoinValues EmptyTable $fInserta $fInsert:*: $fExceptionDefaultValueException $fOrdParam $fEqParam $fShowParam $fNamesSQL$fNamesSqlSource compileFKcompileTableCol compInsertCunCtoTupfromTupliftC2liftC$fFractionalCol$fFractionalCol0$fFractionalCol1$fFractionalCol2$fNumCol $fNumCol0 $fIsStringCol $fColumnsCol $fColumns:*:unAggrsunAggr$fAggregates:*:$fAggregatesAggrGenState runQueryMisolate initStaterenamefreshId freshNamesourcesstaticRestricts groupCols nameSupplyunQPPrunPPcompSqlcompExp compUpdate compDeleteppTypeppLitfreshQueryNameppSqlPPStateppParamsppTables ppParamNS ppQueryNSppTypeTrdependOn ppSomeColppColsppColppUnOpppBinOpmkSelupd$fHasSelectorsta$fHasSelectorst:*:removeDeadCols allColNamesallNonOutputColNamescolNameskeepCols state2sqlallColstoRes finalCols compileWithcompileWithTables compileDelete compQuery $fResultCol $fResult:*:someJoinresultsdepsitemsmaxItemsnextPriocachecached invalidate setMaxItems ResultCacheCacheKey emptyCachetheCachecache'cached' invalidate' setMaxItems' $fHashableLit$fHashableParamghc-prim GHC.TypesIO stBackendstTouchedTables SeldaState insertUnless queryWith typeTrans mkResults withInvalexecgFromRelgToRelgTblColsgMkDummymkDummyidentifyRelDummy Unsafe.Coerce unsafeCoercetblColsGFromRel GRelationTraits isMaybeType ForeignKey