úÎ!_òZþA      !"#$%&'()*+,-./0123456789:;<=>?@ Safe.HVribbitRender a query. Safe -.=?HUVXtAribbitIType level check to see if the field is actually contained in the schema Bribbit€Normalize nested type strings to be right associative. Mainly used to help simplify the implementation of other type families.ribbitString two types together. C  C  C0 is similar in principal to the nested tuple (C, (C, CL)), but looks a whole lot nicer when the number of elements becomes large.7This is how you build up a schema from a collection of  types.E.g.: ?Field "foo" Int :> Field "bar" Text :> Field "baz" (Maybe Text)úIt also the mechanism by which this library builds up the Haskell types for query parameters and resulting rows that get returned. So if you have a query that accepts three text query parameters, that type represented in Haskell is going to be (Only Text  Only Text  Only Text).hIf that query returns rows that contain a Text, an Int, and a Text, then the type of the rows will be (Only Text  Only C  Only Text).ribbit+Define a field in a database schema, where:nameW: is the name of the database column, expressed as a type-level string literal, andtyp<: is the Haskell type whose values get stored in the column.E.g:  "company_name" Text  "expiration_date" (D )ribbit—Type class for defining your own tables. The primary way for you to introduce a new schema is to instantiate this type class for one of your types.E.g.: ×data MyTable instance Table MyTable where type Name MyTable = "my_table" type DBSchema MyTable = Field "id" Int :> Field "my_non_nullable_text_field" Text :> Field "my_nullable_int_field" (Maybe Int) EFAB55Safe -.=?HUVXÃribbitInsert statement. Safe-.HUV*?ribbitE"?" constructor, used to indicate the presence of a query parameter. Gribbit@A closed condition is one that does not allow query parameters. ribbitIs a field not null? ribbitIs a field null? ribbitNOT conditional constructor. ribbitOR constructor for conditions. ribbitAND constructor for conditions. ribbit!">=" constructor for conditions. ribbit ">" constructor for conditions. ribbit!"<=" constructor for conditions. ribbit "<" constructor for conditions. ribbit!"!=" constructor for conditions. ribbit "=" constructor for conditions. ribbitWHERE8 constructor, used for attaching conditions to a query. HI  7 89 9 9 9 9 9 6 Safe -.=?HUVX5Ž Jribbit*Make all the fields of a schema nullable. Kribbit$Produce the schema for a left join. ribbit Left Joins. ribbitON keyword, for joins. Lribbit_Rename the fields in a given schema to reflect an applied table alias. For instance, data FooMribbit'Produce the schema of a cross product. Nribbit2Product the renderable "name" of a cross product. ribbitASE constructor, used for attaching a name to a table in a FROM clause. ribbitFROMU constructor, used for attaching a SELECT projection to a relation in the database.ribbitSELECT" constructor, used for starting a SELECT statement. OribbitCross Product PQR879 6 Safe.HUV6ÓribbitDelete statement.  Safe-.HUV7¸ribbitUpdate statement.  Safe-.HUV>Òribbit,Produce the type of rows return by a query. SribbitrStrip redundant unit types out of a string of types. This is used mainly to help simplify the implementation of .Tribbit Helper for 6. Reduces the number of equations required, because J doesn't actually care about which conditionl operator it is inspecting.ribbitUProduce the type represeting the placeholder ("?") values in a paramaterized query.None-.;=>?HMUVXkXì ribbityRepresents the "base" PostgreSQL type. We say "base" type because whether the type is nullable is handle automatically.e.g. PsqlType "integer" #PsqlType "timestamp with time zone"!ribbit3Figure out if a Haskell type is "nullable" in sql. "ribbit-Produce a list of field names from a schema. #ribbitBMake sure the fields in the list are actually part of the schema. $ribbitfGiven a Haskell type, produce the PostgreSQL type of columns that store values of that haskell type.Uribbit.Wrapper that helps us avoid orphan instances. 'ribbitLike V7, but defined here so we can avoid orphaned instances. (ribbitLike W., but defined here to avoid orphan instances. )ribbitExecute a statement. *ribbit+Create the indicated table in the database.See + for details.+ribbit-Produce the statement used to create a table.€In this example, we create an employee table with a multi-part primary key, one nullable field, and a few non-nullable fields. ÿedata Employee instance Table Employee where type Name = "employees" type DBSchema = Field "company_id" Int :> Field "id" Int :> Field "name" Text :> Field "quit_date" (Maybe Day) let primaryKey :: Proxy '["company_id", "id"] primaryKey = Proxy table :: Proxy Employee table = Proxy in createTableStatement primaryKey table This will produce the statement: Ž"create table employees (company_id integer not null, id integer not null, name text not null, quit_date date, primary key (company_id, id));"XribbitLike Y-, but produce any kind of string-like thing. ,ribbit:Execute a query against a PostgreSQL database connection.  !"#$%&'()*+,$% ),*+"&!#'(Safe-.=?HUVXkZ   Z  ! " # $ % & ' ( )**+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX Y Z [ \ ] ^ _ ` a b cdef2eg3hQihj%ribbit-1.0.0.1-Fq1ifR8WtVqLpfs548MOENDatabase.RibbitDatabase.Ribbit.PostgreSQLDatabase.Ribbit.RenderDatabase.Ribbit.Table Data.TimeDayDatabase.Ribbit.InsertDatabase.Ribbit.ConditionsDatabase.Ribbit.SelectDatabase.Ribbit.DeleteDatabase.Ribbit.UpdateDatabase.Ribbit.ArgsRender:>FieldTableNameDBSchema InsertInto?NotNullIsNullNotOrAndGteGtLteLt NotEqualsEqualsWhereLeftJoinOnAsFromSelect DeleteFromUpdate ResultTypeArgsTypePsqlType unPsqlType HasIsNullable HasFieldsIsSubset HasPsqlTypepsqlType HasPsqlTypesFromRowToRowexecute createTablecreateTableStatementquery $fToRow() $fToRowOnly $fToRow:> $fFromRowOnly $fFromRow:> $fToRowWrap $fFromRowWrap$fHasFields[]:$fHasFields[][]$fHasFieldsTYPE:>$fHasFieldsTYPEField$fHasIsNullableka$fHasIsNullableTYPEMaybe$fHasPsqlTypeTYPEDay$fHasPsqlTypeTYPEInt$fHasPsqlTypeTYPEText$fHasPsqlTypeTYPEMaybe$fHasPsqlTypesTYPE:>$fHasPsqlTypesTYPEField$fIsStringPsqlType ValidFieldFlattenghc-prim GHC.TypesIntbase GHC.MaybeMaybe NotInSchemaValidateClosedConditionRenderJoinConditionsRenderConditionsNullableLeftJoinSchemaAliasAsCrossProductSchemaCrossProductName $fTable[]:Expr RenderFieldRenderFieldList StripUnit ConditionWrap.postgresql-simple-0.6.2-KXDqjDi0t8bFWuSboxW6HA"Database.PostgreSQL.Simple.FromRow Database.PostgreSQL.Simple.ToRow symbolVal GHC.TypeLits