h&⡎      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                     Safe-Inferred ")*;<Tselda#An UUID identifying a database row.seldaA typed row identifier. Generic tables should use this instead of  . Use , to erase the type of a row identifier, and cast from the Database.Selda.Unsafe module if you for some reason need to add a type to a row identifier.seldaA row identifier for some table. This is the type of auto-incrementing primary keys.selda(Some value that is representable in SQL. seldaAn SQL literal..seldaAny type that's bounded, enumerable and has a text representation, and thus representable as a Selda enumerable.While it would be more efficient to store enumerables as integers, this makes hand-rolled SQL touching the values inscrutable, and will break if the user a) derives Enum and b) changes the order of their constructors. Long-term, this should be implemented in PostgreSQL as a proper enum anyway, which mostly renders the performance argument moot.1selda6Any datatype representable in (Selda's subset of) SQL.2seldaCreate a literal of this type.3selda%The SQL representation for this type.4selda#Convert an SqlValue into this type.5seldaDefault value when using def at this type.6seldaRepresentation of an SQL type.CseldaFormat string used to represent date and time when representing timestamps as text. If at all possible, use  instead.DseldaFormat string used to represent date when representing dates as text. If at all possible, use  instead.EseldaFormat string used to represent time of day when representing time as text. If at all possible, use  instead.Fselda2The SQL type representation for the given literal.selda8Constructor tag for all literals. Used for Ord instance.Gselda4Compare two literals of different type for equality.HseldaA row identifier which is guaranteed to not match any row in any table.IseldaIs the given row identifier invalid? I.e. is it guaranteed to not match any row in any table?JseldaCreate a row identifier from an integer. Use with caution, preferably only when reading user input.KseldaInspect a row identifier.LseldaConvert an untyped UUID to a typed one. Use sparingly, preferably only during deserialization.MseldaCreate a typed row identifier from an integer. Use with caution, preferably only when reading user input.NseldaCreate a typed row identifier from an integer. Use with caution, preferably only when reading user input.OseldaA typed row identifier which is guaranteed to not match any row in any table.PseldaIs the given typed row identifier invalid? I.e. is it guaranteed to not match any row in any table?seldaBoth PostgreSQL and SQLite to weird things with time zones. Long term solution is to use proper binary types internally for time values, so this is really just an interim solution.Uselda defaultValue, for UUIDs is the all-zero RFC4122 nil UUID.iselda defaultValue, for UUIDs is the all-zero RFC4122 nil UUID. ,)+!"#$%&'(*-.0/123456987:;<=>?@ABCDEFGHIJKLMNOP12345.0/ ,)+!"#$%&'(*-6987:;<=>?@ABHIJKNMOPGFCDEL  Safe-Inferred 1<{seldaRead the next, potentially composite, result from a stream of columns.|selda4The number of nested columns contained in this type.yz|{  Safe-Inferred")*;seldaAn inductively defined "tuple", or heterogeneous, non-empty list.seldaName of a database table.seldaName of a database column.selda6Modify the given column name using the given function.seldaAdd a prefix to a column name.seldaAdd a suffix to a column name.selda1Convert a column name into a string, with quotes.seldaConvert column names into a string, without quotes, intercalating the given string. MseldaRemove all dead columns recursively, assuming that the given list of column names contains all names present in the final result.seldaReturn the names of all columns in the given top-level query. Subqueries are not traversed.selda)Return the names of all non-output (i.e. ) columns in the given top-level query. Subqueries are not traversed.seldaGet all column names appearing in the given list of (possibly complex) columns.seldaRemove 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.seldaBuild the outermost query from the SQL generation state. Groups are ignored, as they are only used by  aggregate.selda/Get all output columns from a list of SQL ASTs. Safe-Inferred")*01@seldaDenotes that scopes s and t are identical.selda=A database row. A row is a collection of one or more columns.seldaA database column. A column is often a literal column table, but can also be an expression over such a column or a constant expression.seldaAny column tuple.seldaA literal expression.8 Safe-Inferred)*E0 seldaA column selector. Column selectors can be used together with the  and  functions to get and set values on rows, or to specify foreign keys.selda!A selector-value assignment pair.selda(Set the given column to the given value.selda.Modify the given column by the given function.selda?Coalesce nested nullable column into a single level of nesting.selda=A selector indicating the nth (zero-based) column of a table.Will cause errors in queries during compilation, execution, or both, unless handled with extreme care. You really shouldn't use it at all.selda,Extract the given column from the given row.seldaExtract the given column from the given nullable row. Nullable rows usually result from left joins. If a nullable column is extracted from a nullable row, the resulting nested Maybe2s will be squashed into a single level of nesting.selda-Apply the given function to the given column.seldaFor each selector-value pair in the given list, on the given tuple, update the field pointed out by the selector with the corresponding value. 29 9 2 Safe-Inferred 16LseldaOne or more aggregate columns.seldaThe results of a left join are always nullable, as there is no guarantee that all joined columns will be non-null.  JoinCols a where a is an extensible tuple is that same tuple, but in the outer query and with all elements nullable. For instance:  LeftCols (Col (Inner s) Int :*: Col (Inner s) Text) = Col s (Maybe Int) :*: Col s (Maybe Text)seldaConvert one or more inner column to equivalent columns in the outer query. OuterCols (Aggr (Inner s) a :*: Aggr (Inner s) b) = Col s a :*: Col s b, for instance.seldaDenotes 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.seldaA single aggregate column. Aggregate columns may not be used to restrict queries. When returned from an  aggregate subquery, an aggregate column is converted into a non-aggregate column.selda+Lift a function over columns to aggregates.selda+Create a named aggregate function. Like fun, this function is generally unsafe and should ONLY be used to implement missing backend-specific functionality.  Safe-Inferred")*/1QY seldaGeneric worker for .selda7Compute all columns needed to represent the given type.selda+Create a new value with all default fields.selda&Create a new row from the given value.seldaException indicating the use of a default value. If any values throwing this during evaluation of param xs, will be replaced by their default value.selda:Any type which has a corresponding relation. To make a  Relational' instance for some type, simply derive .Note that only types which have a single data constructor, and where all fields are instances of SqlValue 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.selda3Extract all insert parameters from a generic value.seldaExtract all column names from the given type. If the type is not a record, the columns will be named col_1, col_2, etc.seldaThe default value for a column during insertion. For an auto-incrementing primary key, the default value is the next key.Using def in any other context than insertion results in a runtime error. Safe-Inferred")*/1\`seldaA foreign key constraint referencing the given table and column.selda3Some attribute that may be set on a column of type c, in a table of type t.seldaA generic column attribute. Essentially a pair or a record selector over the type a9 and a column attribute. An attribute may be either a ? attribute, meaning that it can span multiple columns, or a  -- single column -- attribute.seldaA non-empty list of selectors, where the element selectors need not have the same type. Used to specify constraints, such as uniqueness or primary key, potentially spanning multiple columns.seldaGenerate a table from the given table name and list of column attributes. All Maybe fields in the table's type will be represented by nullable columns, and all non-Maybe fields fill be represented by required columns. For example: data Person = Person { id :: ID Person , name :: Text , age :: Int , pet :: Maybe Text } deriving Generic people :: Table Person people = table "people" [#id :- autoPrimary]This will result in a table of Person,s, with an auto-incrementing primary key.If the given type does not have record selectors, the column names will be col_1, col_2, etc.seldaGenerate a table from the given table name, a list of column attributes and a function that maps from field names to column names. Ex.: data Person = Person { personId :: Int , personName :: Text , personAge :: Int , personPet :: Maybe Text } deriving Generic people :: Table Person people = tableFieldMod "people" [#personName :- autoPrimaryGen] (fromJust . stripPrefix "person")3This will create a table with the columns named Id, Name, Age and Pet.seldaRemove duplicate attributes.selda,A primary key which does not auto-increment.selda#Create an index on these column(s).selda b  =/ a was inserted at a later point in time than b does not hold.seldaAn untyped auto-incrementing primary key. You should really only use this for ad hoc tables, such as tuples.seldaLike , but for untyped IDs.seldaA table-unique value.selda+An expression representing the given table.101 Safe-Inferred"mseldaQuery the given table.seldaQuery an ad hoc table of type a. Each element in the given list represents one row in the ad hoc table.selda4The set union of two queries. Equivalent to the SQL UNION operator.selda 1 numPpl = do (num_tenants :*: theAddress) <- aggregate $ do h <- select housing theAddress <- groupBy (h ! address) return (count (h ! address) :*: theAddress) restrict (num_tenants .> 1) return (num_tenants :*: theAddress)selda 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 , 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 people 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)selda Perform an  INNER JOIN1 with the current result set and the given query.seldaThe actual code for any join.seldaGroup 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: aggregate $ do person <- select people name' <- groupBy (person ! name) return (name' :*: count(person ! pet_name) .> 0)seldaDrop the first m rows, then get at most n2 of the remaining rows from the given subquery.seldaSort the result rows in ascending or descending order on the given row. If multiple order directives are given, later directives are given precedence but do not cancel out earlier ordering directives. To get a list of persons sorted primarily on age and secondarily on name: peopleInAgeAndNameOrder = do person <- select people order (person ! name) ascending order (person ! age) ascending return (person ! name) For a table [(Alice, 20), (Bob, 20), (Eve, 18)]#, this query will always return [Eve, Alice, Bob].The reason for later orderings taking precedence and not the other way around is composability: order should always sort the current result set to avoid weird surprises when a previous order directive is buried somewhere deep in an earlier query. However, the ordering must always be stable, to ensure that previous calls to order are not simply erased.selda%Sort the result rows in random order.selda*Remove all duplicates from the result set.seldaPredicate determining which lines to join. | Right-hand query to join.seldaPredicate determining which lines to join. | Right-hand query to join.  Safe-Inferred pselda1Any table type that can have selectors generated.selda7An inductive tuple of selectors for the given relation.seldaGenerate 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" [] (tblBar :*: tblBaz) = selectors tbl q :: Query s Text q = do row <- select tbl return (row ! tblBaz)seldaA 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" [] q :: Query s Text q = tblBaz `from` select tblselda&Generate selectors for the given type. Safe-Inferred/01t`seldaAny table type t, which has a field named name.seldaInternal representation of the "no such selector" error message.seldaThe type of the name field, in the record type t.seldaGet the type of the field name! from the generic representation a!, returning the default value b if the field does not exist.seldaGet the next nested type.seldaCreate a selector from a record selector and a type application.For example: > data Foo = Foo > { foo :: Int > , bar :: Text > } deriving Generic > instance SqlRow Foo > > fooTable :: Table Foo > fooTable = table "foo" > > getAllBars :: Query s (Col s Text) > getAllBars = do > t <- select fooTable > return (t ! field @"bar")  Safe-Inferred)*/y seldaAn acceptable query result type; one or more columns stitched together with :*:.seldaConverts the given list of SqlValue1s into an tuple of well-typed results. See  querySQLite for example usage.selda4Produce a list of all columns present in the result.selda3Compile a query into a parameterised SQL statement.The types given are tailored for SQLite. To translate SQLite types into whichever types are used by your backend, use .selda:Compile a query using the given type translation function.selda 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.selda Compile an UPDATE query.selda Compile a  DELETE FROM query.seldaCompile a query to an SQL AST. Groups are ignored, as they are only used by  aggregate.seldaGet a fresh scope from the global scope supply, then use it to compile the given query.seldaTable to update.seldaUpdate function.selda Predicate.  Safe-InferredyW   Safe-Inferred:4selda(The simplest form of Selda computation;  specialized to .selda0Monad transformer adding Selda SQL capabilities.selda(Some monad with Selda SQL capabilitites.selda!Type of database backend used by m.seldaPass a Selda connection to the given computation and execute it. After the computation finishes, withConnection is free to do anything it likes to the connection, including closing it or giving it to another Selda computation. Thus, the computation must take care never to return or otherwise access the connection after returning.seldaPerform the given computation as a transaction. Implementations must ensure that subsequent calls to  within the same transaction always passes the same connection to its argument.selda4A collection of functions making up a Selda backend.seldaExecute an SQL statement.seldaExecute 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.selda9Prepare a statement using the given statement identifier.seldaExecute a prepared statement.seldaGet a list of all columns in the given table, with the type and any modifiers for each column. Return an empty list if the given table does not exist.selda!SQL pretty-printer configuration.selda$Close the currently open connection.selda#Unique identifier for this backend.seldaTurn on or off foreign key checking, and initiate/commit a transaction.>When implementing this function, it is safe to assume that disableForeignKeys True6 will always be called exactly once before each disableForeignKeys False.selda)Comprehensive information about a column.seldaName of the column.seldaSelda type of the column, or the type name given by the database if Selda couldn't make sense of the type.selda&Is the given column auto-incrementing?seldaCan the column be NULL?selda-Is the column explicitly indexed (i.e. using indexed)?seldaAny foreign key (table, column) pairs referenced by this column.selda(Comprehensive information about a table.seldaName of the table.selda,Ordered information about each table column.seldaUnordered list of all (non-PK) uniqueness constraints on this table.seldaGet the column information for each column in the given table.selda*Get the backend in use by the computation.seldaRun a Selda transformer. Backends should use this to implement their withX functions. ,)+!"#$%&'(*-123456987:;<=>?@ABCDE ,)+!"#$%&'(*-123456987:;<=>?@ABCDE Safe-Inferred  seldaSome parameterized query q& that can be prepared into a function f in some  MonadSelda.selda7Build the function that prepares and execute the query.selda%Prepare the query and parameter list.selda%Result type of a monadic computation.selda-Index of first argument parameter to a query.seldaCreate a prepared Selda function. A prepared function has zero or more arguments, and will get compiled into a prepared statement by the first backend to execute it. Any subsequent calls to the function for the duration of the connection to the database will reuse the prepared statement.(Preparable functions are of the form (SqlType a, SqlType b, ...) => Col s a -> Col s b -> ... -> Query s r<. The resulting prepared function will be of the form *MonadSelda m => a -> b -> ... -> m [Res r]$. Note, however, that when using prepared', you must give a concrete type for m2 due to how Haskell's type class resolution works.Prepared functions rely on memoization for just-in-time preparation and caching. This means that if GHC accidentally inlines your prepared function, it may get prepared twice. While this does not affect the correctness of your program, and is fairly unlikely to happen, if you want to be absolutely sure that your queries aren't re-prepared more than absolutely necessary, consider adding a NOINLINE& annotation to each prepared function.Note that when using a constrained backend type variable (i.e. foo :: Bar b => SeldaM b [Int]), optimizations must be enabled for prepared statements to be effective.A usage example: persons :: Table (Text, Int) (persons, name :*: age) = tableWithSelectors "ages" [name :- primary] {-# NOINLINE ageOf #-} ageOf :: Text -> SeldaM [Int] ageOf = prepared $ \n -> do person <- select ages restrict $ (person!name .== n) return ageseldaReplace every indexed parameter with the corresponding provided parameter. Keep all non-indexed parameters in place.seldaInspect a list of parameters, denoting each parameter with either a placeholder index or a literal parameter.seldaForce a parameter deep enough to determine whether it is a placeholder.seldaNext argument index.selda The query.seldaThe list of param types so far. Safe-Inferred" selda?Run a query within a Selda monad. In practice, this is often a  transformer on top of some other monad. Selda transformers are entered using backend-specific withX functions, such as  withSQLite from the SQLite backend.seldaPerform the given query, and insert the result into the given table. Returns the number of inserted rows.seldaInsert 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 def for that column to get the auto-incrementing behavior. Returns the number of rows that were inserted.To insert a list of tuples into a table with auto-incrementing primary key: data Person = Person { id :: ID Person , name :: Text , age :: Int , pet :: Maybe Text } deriving Generic instance SqlResult Person people :: Table Person people = table "people" [autoPrimary :- id] main = withSQLite "my_database.sqlite" $ do insert_ people [ Person def "Link" 125 (Just "horse") , Person 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.seldaAttempt 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 , if even one of the inserted rows would cause a constraint violation, the whole insert operation fails.seldaAttempt 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 id is a row identifier guaranteed to not match any row in any table.Note that this may perform two separate queries: one update, potentially followed by one insert.seldaPerform the given insert, if no rows already present in the table match the given predicate. Returns the primary key of the last 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 id is a row identifier guaranteed to not match any row in any table.seldaLike , but performs the insert when at least one row matches the predicate.seldaLike , but does not return anything. Use this when you really don't care about how many rows were inserted.seldaLike , 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.seldaUpdate the given table using the given update function, for all rows matching the given predicate. Returns the number of updated rows.seldaLike 0, but doesn't return the number of updated rows.seldaFrom the given table, delete all rows matching the given predicate. Returns the number of deleted rows.seldaLike 1, but does not return the number of deleted rows.selda%Create a table from the given schema.seldaCreate a table from the given schema, but don't create any indexes.seldaCreate all indexes for the given table. Fails if any of the table's indexes already exists.selda?Create a table from the given schema, unless it already exists.seldaDrop the given table.selda#Drop the given table, if it exists.seldaPerform the given computation atomically. If an exception is raised during its execution, the entire transaction will be rolled back and the exception re-thrown, even if the exception is caught and handled within the transaction.seldaRun the given computation as a transaction without enforcing foreign key constraints.If the computation finishes with the database in an inconsistent state with regards to foreign keys, the resulting behavior is undefined. Use with extreme caution, preferably only for migrations.?On the PostgreSQL backend, at least PostgreSQL 9.6 is required.Using this should be avoided in favor of deferred foreign key constraints. See SQL backend documentation for deferred constraints.selda5Build the final result from a list of result columns.seldaGenerate the final result of a query from a list of untyped result rows.selda%Execute a statement without a result.seldaLike  , but in .seldaTable to update.selda Predicate.seldaUpdate function.! Safe-InferredWseldaClose a reusable Selda connection. Closing a connection while in use is undefined. Passing a closed connection to  results in a  being thrown. Closing a connection more than once is a no-op. -*('&%$#"!+,).0/154236BA@?>=<;:798CDEFGHIJKLMNOP -*('&%$#"!+,).0/154236BA@?>=<;:798CDEFGHIJKLMNOP Safe-InferredseldaCast a column to another type, using whichever coercion semantics are used by the underlying SQL implementation.seldaCast an aggregate to another type, using whichever coercion semantics are used by the underlying SQL implementation.selda,Sink the given function into an inner scope.Be careful not to use this function with functions capturing rows or columns from an outer scope. For instance, the following usage will likely lead to disaster: query $ do x <- #age `from` select person inner $ sink (\p -> x + (p ! #age)) <$> select personReally, if you have to use this function, ONLY do so in the global scope.seldaLike , but with two arguments.seldaA 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.seldaLike , but with two arguments.seldaA custom operator. operator "~>" a b will compile down to a ~> b, with parentheses around a and b iff they are not atomic. This means that SQL operator precedence is disregarded, as all subexpressions are parenthesized. In the following example for instance,  foo a b c will compile down to  (a ~> b) ~> c. 8(~>) = operator "~>" infixl 5 ~> foo a b c = a ~> b ~> cseldaLike , but with zero arguments.selda6Create a raw SQL query fragment from the given column.selda5Create a raw SQL query fragment from the given value.seldaCreate a column referring to a name of your choice. Use this to refer to variables not exposed by Selda.seldaCreate an expression from the given text. The expression will be inserted verbatim into your query, so you should NEVER pass user-provided text to this function.seldaExecute a raw SQL statement.seldaExecute a raw SQL statement, returning a row consisting of columns by the given names. Will fail if the number of names given does not match up with the type of the returned row. Will generate invalid SQL if the given names don't match up with the column names in the given query.seldaAs >, but returns only a single column. Same warnings still apply. Safe-Inferred")*1;?3selda row user_info `with` [...])seldaConvenient shorthand for fmap (! sel) q-. The following two queries are quivalent: q1 = name `from` select people q2 = do person <- select people return (person ! name)selda0Explicitly 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.seldaCreate 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.seldaComparisons over columns. Note that when comparing nullable (i.e. Maybe) columns, SQL NULL7 semantics are used. This means that comparing to a NULL field will remove the row in question from the current set. To test for NULL, use  instead of .== literal Nothing.seldaComparisons over columns. Note that when comparing nullable (i.e. Maybe) columns, SQL NULL7 semantics are used. This means that comparing to a NULL field will remove the row in question from the current set. To test for NULL, use  instead of .== literal Nothing.seldaIs the given column null?seldaApplies the given function to the given nullable column where it isn't null, and returns the given default value where it is. This is the Selda equivalent of .seldaIf the second value is Nothing, return the first value. Otherwise return the second value.selda Ordering for .selda Ordering for .seldaLift a non-nullable column to a nullable one. Useful for creating expressions over optional columns: data Person = Person {name :: Text, age :: Int, pet :: Maybe Text} deriving Generic instance SqlRow Person people :: Table Person people = table "people" [] peopleWithCats = do person <- select people restrict (person ! #pet .== just "cat") return (person ! #name)seldaReturns  if the given field in the given row is equal to the given literal.seldaSQL NULL, at any type you like.seldaSpecialization of  for integers.seldaSpecialization of  for doubles.seldaSpecialization of  for text.selda True and false boolean literals.selda True and false boolean literals.seldaThe SQL LIKE operator; matches strings with % wildcards. For instance: "%gon" `like` "dragon" .== trueselda2The number of non-null values in the given column.selda.The average of all values in the given column.seldaThe greatest value in the given column. Texts are compared lexically.seldaThe smallest value in the given column. Texts are compared lexically.selda#Sum all values in the given column.selda4Round a value to the nearest integer. Equivalent to  roundTo 0.selda6Round a column to the given number of decimals places.selda(Calculate the length of a string column.seldaBoolean negation.selda-Convert a boolean column to any numeric type.selda.Convert an integer column to any numeric type.selda!Convert any SQL type to a string.selda&Convert the given string to uppercase.selda&Convert the given string to lowercase.selda!Perform a conditional on a column .0/12345HIJKLMNOPyz|{}~12345z|{y.0/ OPNMLHIKJ}~   442222277444444324 Safe-Inferred /selda5Two SQL types which are identical modulo nullability.seldaUnconditionally convert a nullable value into a non-nullable one, using the standard SQL null-coalescing behavior.seldaSelector indexing, overloaded to work on nullable as well as non-nullable rows.seldaConverts a nullable column into a non-nullable one, yielding the empty result set if the column is null.selda?Restrict a query using a nullable expression. Equivalent to restrict . ifNull false. 44444466779  Safe-Inferred"ـ seldaA description of the difference between a column in a Selda table and its corresponding database column.seldaA description of the difference between a schema and its corresponding database table.seldaAre the given types compatible?seldaValidate a table schema, and check it for consistency against the current database. Throws a  if the schema does not validate, or if inconsistencies were found.seldaEnsure that the schema of the given table is valid. Does not ensure consistency with the current database.seldaPretty-print a table diff.seldaPretty-print a column diff.seldaGet a description of the table by the given name currently in the database.seldaCheck the given table for consistency with the current database, returning a description of all inconsistencies found. The table schema itself is not validated beforehand.seldaCompute the difference between the two given tables. The first table is considered to be the schema, and the second the database.seldaCompute the difference between the columns of two tables. The first table is considered to be the schema, and the second the database.66  Safe-Inferred")*seldaA migration step is zero or more migrations that need to be performed in a single transaction in order to keep the database consistent.seldaWrapper for user with , enabling multiple migrations to be packed into the same list: migrateAll [ Migration m1_from m1_to m1_upgrade , Migration m2_from m2_to m2_upgrade , ... ]seldaMigrate the first table into the second, using the given function to migrate all records to the new schema. Both table schemas are validated before starting the migration, and the source table is validated against what's currently in the database.The migration is performed as a transaction, ensuring that either the entire migration passes, or none of it does.seldaLike , but allows the column upgrade to access the entire database.selda5Perform all given migrations as a single transaction.seldaGiven a list of migration steps in ascending chronological order, finds the latest migration step starting state that matches the current database, and performs all migrations from that point until the end of the list. The whole operation is performed as a single transaction.*If no matching starting state is found, a  is thrown. If the database is already in the state specified by the end state of the final step, no migration is performed.Note that when looking for a matching starting state, index methods for indexed columns are not taken into account. Two columns c1 and c2& are considered to be identical if c1 is indexed with index method foo and c2 is indexed with index method bar.seldaWorkhorse for migration. Is NOT performed as a transaction, so exported functions need to properly wrap calls this function.seldaTable to migrate from.seldaTable to migrate to.seldaMapping from old to new table.selda&Enforce foreign keys during migration?seldaMigration step to perform.selda&Enforce foreign keys during migration?seldaMigration steps to perform. !" !# !$ !% &' !( !) *+ *, -./012345675895:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                         O      !     $selda-0.5.2.0-BxjrPcn64wf9X9ipyvItC2Database.SeldaDatabase.Selda.SqlTypeDatabase.Selda.BackendDatabase.Selda.Backend.InternalDatabase.Selda.UnsafeDatabase.Selda.DebugDatabase.Selda.MakeSelectorsDatabase.Selda.NullableDatabase.Selda.ValidationDatabase.Selda.MigrationsDatabase.Selda.SqlRowDatabase.Selda.TypesDatabase.Selda.ExpDatabase.Selda.SQLDatabase.Selda.Table.TypeDatabase.Selda.Table.ValidationDatabase.Selda.SQL.Print.ConfigDatabase.Selda.Table.CompileDatabase.Selda.SQL.PrintDatabase.Selda.Query.TypeDatabase.Selda.TransformDatabase.Selda.ColumnDatabase.Selda.SelectorsDatabase.Selda.InnerDatabase.Selda.GenericDatabase.Selda.TableDatabase.Selda.QueryDatabase.Selda.FieldSelectorsDatabase.Selda.CompileDatabase.Selda.PreparedDatabase.Selda.FrontendbaseGHC.Base<>memptymappendmconcat GHC.GenericsGeneric SemigroupMonoidControl.Monad.IO.ClassliftIOMonadIOGHC.OverloadedLabelsIsLabelexceptions-0.10.4Control.Monad.Catch MonadMask text-1.2.5.0Data.Text.InternalText time-1.11.1.1&Data.Time.LocalTime.Internal.TimeOfDay TimeOfDay Data.Time.Clock.Internal.UTCTimeUTCTimeData.Time.Calendar.DaysDay'uuid-types-1.0.5-6f31YKcgqRq5L61qqUaVIyData.UUID.Types.InternalUUIDUUID' untypedUuidIDuntypedRowIDSqlValueSqlInt32SqlInt64SqlFloat SqlStringSqlBoolSqlBlob SqlUTCTimeSqlTimeSqlDateSqlNullLitLTextLInt32LInt64LDoubleLBool LDateTimeLDateLTimeLJustLBlobLNullLCustomLUUIDSqlEnumtoTextfromTextSqlTypemkLitsqlTypefromSql defaultValue SqlTypeRepTTextTRowIDTInt64TInt32TFloatTBool TDateTimeTDateTTimeTBlobTUUIDTJSONsqlDateTimeFormat sqlDateFormat sqlTimeFormatlitTypecompLit invalidRowIdisInvalidRowIdtoRowId fromRowId typedUuidtoIdfromId invalidId isInvalidId $fSqlEnuma$fShowSqlValue$fSqlTypeOrdering$fSqlTypeMaybe $fSqlTypeUUID$fSqlTypeByteString$fSqlTypeByteString0$fSqlTypeTimeOfDay $fSqlTypeDay$fSqlTypeUTCTime $fSqlTypeBool $fSqlTypeText$fSqlTypeText0$fSqlTypeDouble$fSqlTypeInt32$fSqlTypeInt64 $fSqlTypeInt $fShowLit$fOrdLit$fEqLit$fSqlTypeRowID $fShowRowID $fSqlTypeID$fShowID$fSqlTypeUUID' $fShowUUID'$fExceptionFromSqlError$fShowFromSqlError $fEqUUID' $fOrdUUID'$fGenericUUID'$fEqID$fOrdID $fGenericID $fEqRowID $fOrdRowID$fGenericRowID$fShowSqlTypeRep$fEqSqlTypeRep$fOrdSqlTypeRepGSqlRowSqlRow nextResult nestedColsTupHead:*: TableNameColName fromColName fromTableName rawTableName mkColName mkTableNamefirstsecondthirdfourthfifthParamOrderAscDesc QueryFragment IndexMethod BTreeIndex HashIndexColAttrPrimary AutoPrimaryRequiredOptionalUniqueIndexed AutoIncTypeWeakStrongTable tableName isAutoPrimary isPrimaryisUniqueValidationErrorPPConfigppType ppTypeHookppTypePK ppPlaceholder ppColAttrsppColAttrsHookppAutoIncInsertppMaxInsertParamsppIndexMethodHook defPPConfigOnErrorFailIgnorecompileCreateTablecompileDropTableQuerySameRowColColumnsliteralSelector Assignment:=CoalesceunsafeSelector!?$=with AggregatesLeftColsAggrCols OuterColsInnerAggraggr Relationaldef ForeignKey foreignKey Attribute SelectorLikeAttr:-Group:+Singletable tableFieldModprimaryindex indexUsing autoPrimaryweakAutoPrimaryuntypedAutoPrimaryweakUntypedAutoPrimaryuniqueselect selectValuesunionunionAllrestrict aggregateleftJoin innerJoingroupBylimitorder orderRandomdistinct GSelectors Selectors selectorstableWithSelectors$fGSelectorst:*:$fGSelectorst:*:0$fGSelectorstM1$fGSelectorstK1HasField FieldTypeResultRescompile compileInsert compileUpdateSeldaMSeldaTSunS MonadSeldaBackendwithConnectiontransact SeldaBackendrunStmt runStmtWithPK prepareStmt runPrepared getTableInfoppConfigcloseConnection backendIddisableForeignKeys ColumnInfocolNamecolTypecolIsAutoPrimary colIsNullable colHasIndexcolFKs TableInfo tableInfoNametableColumnInfostableUniqueGroupstablePrimaryKeySeldaConnection connBackendconnDbId connStmts connClosedconnLock SeldaStmt stmtHandlestmtText stmtParams QueryRunnerStmtID SeldaErrorDbErrorSqlError UnsafeError BackendIDSQLite PostgreSQLOther freshStmtId newConnectionallStmts fromColInfo tableInfo withBackend runSeldaT$fExceptionSeldaError$fMonadTransSeldaT$fMonadSeldaSeldaT$fFunctorSeldaT$fApplicativeSeldaT $fMonadSeldaT$fMonadIOSeldaT$fMonadThrowSeldaT$fMonadCatchSeldaT$fMonadMaskSeldaT$fMonadFailSeldaT$fShowTableInfo $fEqTableInfo$fShowColumnInfo$fEqColumnInfo $fShowConnID $fEqConnID $fOrdConnID $fShowStmtID $fEqStmtID $fOrdStmtID$fShowSeldaError$fEqSeldaError$fShowBackendID $fEqBackendID$fOrdBackendIDPrepare Preparablepreparedquery queryIntoinsert tryInsertupsert insertUnless insertWheninsert_ insertWithPKupdateupdate_ deleteFrom deleteFrom_ createTabletryCreateTable dropTable tryDropTable transactionwithoutForeignKeyEnforcement seldaClosecastcastAggrsinksink2funfun2operatorfun0injinjLitrawNamerawExprawStmrawQuery rawQuery1SetisInMappable Container.<$>TheTheOnlytheIsUUIDuuidOnlySqlOrdnewUuidsel+=-=*=||=&&=onlynewrowfrominnersuchThat.==./=.>.<.>=.<=isNull matchNullifNull.&&.|| ascending descendingjustisnull_intfloattexttruefalselikecountavgmax_min_sum_round_roundTolength_not_fromBoolfromInttoStringtoUppertoLower ifThenElse $fMonoidCol$fSemigroupCol $fSqlOrdID $fSqlOrdMaybe$fSqlOrdTimeOfDay$fSqlOrdUTCTime $fSqlOrdDay $fSqlOrdText $fSqlOrdRowID $fSqlOrda $fSqlTypeOnly $fSqlRowOnly $fIsUUIDUUID' $fIsUUIDUUID$fTheRow $fTheOnly $fMappableCol$fMappableAggr $fSetQuery$fSet[] $fGenericOnly $fShowOnly $fReadOnly$fEqOnly $fOrdOnly $fEnumOnly $fNumOnly$fIntegralOnly$fFractionalOnly $fRealOnly$fIsStringOnlyNonNull:?~?==?/=?>?<?>=?<=?+?-?*?/?!nonNull restrict' ColumnDiff ColumnMissing ColumnPresent NameMismatch UnknownType TypeMismatchAutoIncrementMismatchNullableMismatchForeignKeyMissingForeignKeyPresent IndexMismatch TableDiffTableOK TableMissing UniqueMissing UniquePresent PkMissing PkPresentInconsistentColumns validateTablevalidateSchema showTableDiffshowColumnDiff describeTable diffTable diffTables$fShowColumnDiff$fShowTableDiff $fEqTableDiff$fEqColumnDiff MigrationmigratemigrateM migrateAll autoMigrate litConTagwithWeirdTimeZone ResultReaderrunResultReadernext modColName addColPrefix addColSuffixintercalateColNames escapeQuotestupHeadNames allNamesInExpSomeCol hideRenamingBinOpMulSubAddCustomOpOrLteGteLtGtNeqLikeAndDivEqUnOpSgnNegAbsIsNullFunNotNulOpFun0AggrExRawFun2CastInListInQueryIf UntypedColUntypedNamedSomeSQL liveExtrasJoinType SqlSourcesqlFromparam paramTypesourceorderinglimitsgroups restrictscolsLeftJoin InnerJoinJoinValues EmptyTableRawSqlUnionProductRawExpRawTextRawCatColInfo tableColscolAttrstableHasAutoPK tableAttrscolExprvalidatevalidateOrThrowsnubsoupdefType defColAttrcompileCreateIndexes indexNameForcompileCreateIndex compileFKcompileTableCol compInsertPPrunPPcompSqlcompExpcompRaw compUpdate compDeleteppLitfreshQueryNameppSqlPPState ppQueryNS ppParamNSppParamsppRaw ppSomeColppColsppColppNulOpppUnOpppBinOpGenStateName runQueryMisolate initStaterenamefreshId freshName nameScope groupColsstaticRestricts nameSupplysourcesunQIdentScope renameAllremoveDeadCols allColNamesimplicitlyLiveColscolNameskeepCols state2sqlallColsliftC2ManyOnetoTupfromTupliftC3liftCModify selectorIndexliftAggrunAggrsunAggrgParamsparamsgTblColsgNewgRowDefaultValueExceptiontblColstidy tableExprsomeJoin selectorsForNoSuchSelector GFieldType GetFieldTypefieldtoRes finalCols compileWith compileDelete compQuerycompQueryWithFreshScope buildResultghc-prim GHC.TypesIOConnIDmkFunmkQueryResultT firstParamIx replaceParams inspectParams forceParamcreateTableWithoutIndexescreateTableIndexes queryWith mkResultsexecexecIOFunctor Data.Maybemaybe fromNullableisCompatibleWith diffColumns MigrationStepmigrateInternal