Idris2Doc : Sqlite3.Cmd

Sqlite3.Cmd

(source)

Definitions

toExprs : LAll (Maybe.IdrisType) ts->LAll (Exprs) ts
  We can always convert a list of marshallable Idris values to
a list of SQL expressions.

Totality: total
Visibility: export
recordVal : SQLTable->Type
  A single name-value pair in an `UPDATE` statement.

Totality: total
Visibility: public export
Constructor: 
V : (name : String) -> {auto0prf : IsJust (FindColname (t.cols))} ->Expr [<t] (TableColTypenamet) ->Valt

Projections:
.name : Valt->String
0.prf : ({rec:0} : Valt) ->IsJust (FindCol (name{rec:0}) (t.cols))
.val : ({rec:0} : Valt) ->Expr [<t] (TableColType (name{rec:0}) t)
.name : Valt->String
Totality: total
Visibility: public export
name : Valt->String
Totality: total
Visibility: public export
0.prf : ({rec:0} : Valt) ->IsJust (FindCol (name{rec:0}) (t.cols))
Totality: total
Visibility: public export
0prf : ({rec:0} : Valt) ->IsJust (FindCol (name{rec:0}) (t.cols))
Totality: total
Visibility: public export
.val : ({rec:0} : Valt) ->Expr [<t] (TableColType (name{rec:0}) t)
Totality: total
Visibility: public export
val : ({rec:0} : Valt) ->Expr [<t] (TableColType (name{rec:0}) t)
Totality: total
Visibility: public export
(.=) : {autoto : ToCella} -> (name : String) -> {auto0prf : IsJust (FindColname (t.cols))} -> {auto0_ : TableColTypenamet=ToCellTypea} ->a->Valt
  Operator alias for the data constructor of `Val`,
specialized for usage with Idris types with a
`ToCell` implementation.

Totality: total
Visibility: public export
Fixity Declaration: infix operator, level 1
dataAction : Type
  Foreign Key Actions

Totality: total
Visibility: public export
Constructors:
SET_NULL : Action
SET_DEFAULT : Action
CASCADE : Action
RESTRICT : Action
NO_ACTION : Action
dataEvent : Type
Totality: total
Visibility: public export
Constructors:
ON_UPDATE : Action->Event
ON_DELETE : Action->Event
dataConstraint : SQLTable->Type
  Column and table constraints to be used when creating a new table.

Totality: total
Visibility: public export
Constructors:
NOT_NULL : TColumntx->Constraintt
AUTOINCREMENT : TColumntx->Constraintt
UNIQUE : LAll (TColumnt) xs->Constraintt
PRIMARY_KEY : LAll (TColumnt) xs->Constraintt
ForeignKey : (s : SQLTable) ->LAll (TColumnt) xs->LAll (TColumns) xs->ListEvent->Constraintt
CHECK : Expr [<t] BOOL->Constraintt
DEFAULT : (s : String) -> {auto0prf : IsJust (FindCols (t.cols))} ->Expr [<t] (TableColTypest) ->Constraintt
FOREIGN_KEY : (s : SQLTable) ->LAll (TColumnt) xs->LAll (TColumns) xs->Constraintt
  Convenience API to construct a foreign key constraint.

Totality: total
Visibility: public export
FOREIGN_KEY' : (s : SQLTable) ->LAll (TColumnt) xs->LAll (TColumns) xs->ListEvent->Constraintt
  Constructs a foreign key constraint with actions

Totality: total
Visibility: public export
dataCmdType : Type
  Index used to distinguish different types of commands.

This should facilitate writing combinator such as
`IF_NOT_EXISTS` to operate only on certain commands.

Totality: total
Visibility: public export
Constructors:
TCreate : CmdType
TDelete : CmdType
TDrop : CmdType
TInsert : CmdType
TSelect : CmdType
TUpdate : CmdType
dataCmd : CmdType->Type
  Data management commands for creating tables and
inserting, updating, or deleting rows in a table.

Totality: total
Visibility: public export
Constructors:
CreateTable : (t : SQLTable) ->List (Constraintt) ->Bool->CmdTCreate
  Information used to create a new table.

It is recommended to use a combination of `CREATE_TABLE` and
`IF_NOT_EXISTS` instead of using this constructor directly.
DropTable : SQLTable->Bool->CmdTDrop
INSERT : (t : SQLTable) ->LAll (TColumnt) ts->LAll (Expr [<t]) ts->CmdTInsert
  Information required to insert data into a table.

This is well suited if you want to have full control over
the expressions used to insert data. If, however, you want
to insert an Idris value with a `ToRow` implementation,
consider using function `insert` instead.
REPLACE : (t : SQLTable) ->LAll (TColumnt) ts->LAll (Expr [<t]) ts->CmdTInsert
  Information required to insert or replace data in a a table.

This is like insert, but will replace values to fullfil `UNIQUE`
constraints in the table. As such, it is useful for updating
data that might not yet be present in a table.

This is well suited if you want to have full control over
the expressions used to replace data. If, however, you want
to insert an Idris value with a `ToRow` implementation,
consider using function `replace` instead.
UPDATE : (t : SQLTable) ->List (Valt) ->Expr [<t] BOOL->CmdTUpdate
  Information required to update values in table.
DELETE : (t : SQLTable) ->Expr [<t] BOOL->CmdTDelete
  Information required to delete values from a table.
insert : {autoas : ToRowv} -> (t : SQLTable) ->LAll (TColumnt) (ToRowTypesv) ->v->CmdTInsert
  Utility version of `INSERT` for those cases when you want to
insert an Idris value with a `ToRow` implementation.

Totality: total
Visibility: export
replace : {autoas : ToRowv} -> (t : SQLTable) ->LAll (TColumnt) (ToRowTypesv) ->v->CmdTInsert
  Utility version of `REPLACE` for those cases when you want to
replace an Idris value with a `ToRow` implementation.

Totality: total
Visibility: export
dataCmds : Type
  A list of different types of commands, with the
command types being hidden.

Totality: total
Visibility: public export
Constructors:
Nil : Cmds
(::) : Cmdt->Cmds->Cmds

Hints:
MonoidCmds
SemigroupCmds
(++) : Cmds->Cmds->Cmds
Totality: total
Visibility: export
Fixity Declaration: infixr operator, level 7
fromList : List (Cmdt) ->Cmds
Totality: total
Visibility: export
IF_NOT_EXISTS : CmdTCreate->CmdTCreate
  Create a table only if it does not yet exist.

Totality: total
Visibility: public export
IF_EXISTS : CmdTDrop->CmdTDrop
  Drop a table only if it exists.

Totality: total
Visibility: public export
CREATE_TABLE : (t : SQLTable) ->List (Constraintt) ->CmdTCreate
  Convenience constructor for the `CreateTable` command

Totality: total
Visibility: public export
DROP_TABLE : SQLTable->CmdTDrop
  Convenience constructor for the `DropTable` command

Totality: total
Visibility: public export
0JoinPred : Schema->SQLTable->Type
Totality: total
Visibility: public export
dataJoin : Schema->SQLTable->Type
Totality: total
Visibility: public export
Constructors:
JOIN : (t : SQLTable) ->JoinPred (s:<t0) t->Join (s:<t0) t
OUTER_JOIN : (t : SQLTable) ->JoinPred (s:<t0) t->Join (s:<t0) t
CROSS_JOIN : (t : SQLTable) ->Join (s:<t0) t
FROM : (t : SQLTable) ->Join [<] t
USING : (JoinPredst->Joinst) ->List (JColumnst) ->Joinst
Totality: total
Visibility: public export
ON : (JoinPredst->Joinst) ->Expr (s:<t) BOOL->Joinst
Totality: total
Visibility: public export
dataFrom : Schema->Type
  The `FROM` part in a select statement.

Totality: total
Visibility: public export
Constructors:
Lin : From [<]
(:<) : Froms->Joinst->From (s:<t)
dataAscDesc : Type
  Tag indicating, whether results should be sorted in ascending
or descending order.

Totality: total
Visibility: public export
Constructors:
NoAsc : AscDesc
Asc : AscDesc
Desc : AscDesc
dataCollation : SqliteType->Type
  Different collations used during ordering.

Currently, only `NO CASE` is supported.

Totality: total
Visibility: public export
Constructors:
None : Collationt
NOCASE : CollationTEXT
recordOrderingTerm : Schema->Type
Totality: total
Visibility: public export
Constructor: 
O : Exprstpe->Collationtpe->AscDesc->OrderingTerms

Projections:
.asc : OrderingTerms->AscDesc
.coll : ({rec:0} : OrderingTerms) ->Collation (tpe{rec:0})
.expr : ({rec:0} : OrderingTerms) ->Exprs (tpe{rec:0})
0.tpe : OrderingTerms->SqliteType
0.tpe : OrderingTerms->SqliteType
Totality: total
Visibility: public export
0tpe : OrderingTerms->SqliteType
Totality: total
Visibility: public export
.expr : ({rec:0} : OrderingTerms) ->Exprs (tpe{rec:0})
Totality: total
Visibility: public export
expr : ({rec:0} : OrderingTerms) ->Exprs (tpe{rec:0})
Totality: total
Visibility: public export
.coll : ({rec:0} : OrderingTerms) ->Collation (tpe{rec:0})
Totality: total
Visibility: public export
coll : ({rec:0} : OrderingTerms) ->Collation (tpe{rec:0})
Totality: total
Visibility: public export
.asc : OrderingTerms->AscDesc
Totality: total
Visibility: public export
asc : OrderingTerms->AscDesc
Totality: total
Visibility: public export
ASC : Exprst->OrderingTerms
Totality: total
Visibility: public export
DESC : Exprst->OrderingTerms
Totality: total
Visibility: public export
COLLATE : (o : OrderingTerms) ->Collation (o.tpe) ->OrderingTerms
Totality: total
Visibility: public export
recordGroupingTerm : Schema->Type
Totality: total
Visibility: public export
Constructor: 
G : Exprstpe->Collationtpe->GroupingTerms

Projections:
.coll : ({rec:0} : GroupingTerms) ->Collation (tpe{rec:0})
.expr : ({rec:0} : GroupingTerms) ->Exprs (tpe{rec:0})
0.tpe : GroupingTerms->SqliteType
0.tpe : GroupingTerms->SqliteType
Totality: total
Visibility: public export
0tpe : GroupingTerms->SqliteType
Totality: total
Visibility: public export
.expr : ({rec:0} : GroupingTerms) ->Exprs (tpe{rec:0})
Totality: total
Visibility: public export
expr : ({rec:0} : GroupingTerms) ->Exprs (tpe{rec:0})
Totality: total
Visibility: public export
.coll : ({rec:0} : GroupingTerms) ->Collation (tpe{rec:0})
Totality: total
Visibility: public export
coll : ({rec:0} : GroupingTerms) ->Collation (tpe{rec:0})
Totality: total
Visibility: public export
fromString : (col : String) -> {auto0_ : IsJust (FindSchemaColcols)} ->GroupingTerms
Totality: total
Visibility: public export
ord : GroupingTerms->OrderingTerms
Totality: total
Visibility: public export
recordNamedExpr : Schema->SqliteType->Type
Totality: total
Visibility: public export
Constructor: 
AS : Exprst->String->NamedExprst

Projections:
.expr : NamedExprst->Exprst
.name : NamedExprst->String
.expr : NamedExprst->Exprst
Totality: total
Visibility: public export
expr : NamedExprst->Exprst
Totality: total
Visibility: public export
.name : NamedExprst->String
Totality: total
Visibility: public export
name : NamedExprst->String
Totality: total
Visibility: public export
fromString : (col : String) -> {auto0p : IsJust (FindSchemaColcols)} ->NamedExprs (SchemaColTypecols)
Totality: total
Visibility: public export
columnName : NamedExprst->String
  Extracts the column name we use to reference a named
expression.

If a custom name has been set, this will be returned. Otherwise,
if the expression references a table column, that columns (possibly
qualified) name will be returned.

Totality: total
Visibility: export
ExprColumns : LAll (NamedExprs) ts->ListColumn
  Computes a list of named and typed columns from a list of
name expressions.

Expressions with an empty string as their name are not included in
the result.

Totality: total
Visibility: public export
ExprSchema : LAll (NamedExprs) ts->Schema
  Appends an unnamed table with the list of columns coming from
the given list of named expressions to a schema.

Expressions with an empty string as their name are not included in
the result.

This is used to compute the full `Schema` to be used in
those fields of `Query` that are used for filtering, grouping, and
sorting.

Totality: total
Visibility: public export
recordQuery : Type->Type
  Different types of `SELECT` commands.

Totality: total
Visibility: public export
Constructor: 
Q : {autofromRow : FromRowt} ->Bool-> (schema : Schema) ->Fromschema-> (columns : LAll (NamedExprschema) (FromRowTypest)) ->Expr (ExprSchemacolumns) BOOL->Expr (ExprSchemacolumns) BOOL->List (GroupingTerm (ExprSchemacolumns)) ->List (OrderingTerm (ExprSchemacolumns)) ->MaybeNat->Nat->Queryt

Projections:
.columns : ({rec:0} : Queryt) ->LAll (NamedExpr (schema{rec:0})) (FromRowTypest)
.distinct : Queryt->Bool
.from : ({rec:0} : Queryt) ->From (schema{rec:0})
.fromRow : Queryt->FromRowt
.group_by : ({rec:0} : Queryt) ->List (GroupingTerm (ExprSchema (columns{rec:0})))
.having : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
.limit : Queryt->MaybeNat
.offset : Queryt->Nat
.order_by : ({rec:0} : Queryt) ->List (OrderingTerm (ExprSchema (columns{rec:0})))
.schema : Queryt->Schema
.where_ : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL

Hint: 
Queryt=>FromRowt
.fromRow : Queryt->FromRowt
Totality: total
Visibility: public export
fromRow : Queryt->FromRowt
Totality: total
Visibility: public export
.distinct : Queryt->Bool
Totality: total
Visibility: public export
distinct : Queryt->Bool
Totality: total
Visibility: public export
.schema : Queryt->Schema
Totality: total
Visibility: public export
schema : Queryt->Schema
Totality: total
Visibility: public export
.from : ({rec:0} : Queryt) ->From (schema{rec:0})
Totality: total
Visibility: public export
from : ({rec:0} : Queryt) ->From (schema{rec:0})
Totality: total
Visibility: public export
.columns : ({rec:0} : Queryt) ->LAll (NamedExpr (schema{rec:0})) (FromRowTypest)
Totality: total
Visibility: public export
columns : ({rec:0} : Queryt) ->LAll (NamedExpr (schema{rec:0})) (FromRowTypest)
Totality: total
Visibility: public export
.where_ : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
Totality: total
Visibility: public export
where_ : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
Totality: total
Visibility: public export
.having : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
Totality: total
Visibility: public export
having : ({rec:0} : Queryt) ->Expr (ExprSchema (columns{rec:0})) BOOL
Totality: total
Visibility: public export
.group_by : ({rec:0} : Queryt) ->List (GroupingTerm (ExprSchema (columns{rec:0})))
Totality: total
Visibility: public export
group_by : ({rec:0} : Queryt) ->List (GroupingTerm (ExprSchema (columns{rec:0})))
Totality: total
Visibility: public export
.order_by : ({rec:0} : Queryt) ->List (OrderingTerm (ExprSchema (columns{rec:0})))
Totality: total
Visibility: public export
order_by : ({rec:0} : Queryt) ->List (OrderingTerm (ExprSchema (columns{rec:0})))
Totality: total
Visibility: public export
.limit : Queryt->MaybeNat
Totality: total
Visibility: public export
limit : Queryt->MaybeNat
Totality: total
Visibility: public export
.offset : Queryt->Nat
Totality: total
Visibility: public export
offset : Queryt->Nat
Totality: total
Visibility: public export
queryAsRow : Queryt=>FromRowt
Totality: total
Visibility: public export
0LQuery : ListType->Type
Totality: total
Visibility: public export
SELECT : {autofromRow : FromRowt} ->LAll (NamedExprs) (FromRowTypest) ->Froms->Queryt
Totality: total
Visibility: public export
SELECT_DISTINCT : {autofromRow : FromRowt} ->LAll (NamedExprs) (FromRowTypest) ->Froms->Queryt
Totality: total
Visibility: public export
GROUP_BY : (q : Queryt) ->List (GroupingTerm (ExprSchema (q.columns))) ->Queryt
Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 7
WHERE : (q : Queryt) ->Expr (ExprSchema (q.columns)) BOOL->Queryt
Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 7
HAVING : (q : Queryt) ->Expr (ExprSchema (q.columns)) BOOL->Queryt
Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 7
ORDER_BY : (q : Queryt) ->List (OrderingTerm (ExprSchema (q.columns))) ->Queryt
Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 7
LIMIT : Queryt->Nat->Queryt
Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 7
OFFSET : Queryt->Nat->Queryt
Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 7