Sql
package
This package provides a SQL database client.
{
"type": "system"
}
Install
{
"dependencies": {
"Sql": "pen:///sql"
}
}
Sql'Context
module
Types
Context
A SQL database context
type Context = context'Context
Functions
No functions are defined.
Sql'Pool
module
Types
Pool
A connection pool
type Pool = pool'Pool
Functions
New
Create a connection pool.
\(context Context, uri string, options Options) Pool | error
Query
Run a query and return its rows.
\(context Context, pool Pool, query string, arguments [Value]) [[Value]] | error
Execute
Run a query and return a number of affected rows.
\(context Context, pool Pool, query string, arguments [Value]) number | error
Sql'Pool'Options
module
Types
Options
Connection pool options
type Options {
MinConnections number
MaxConnections number
ConnectTimeout number
}
Functions
No functions are defined.
Sql'Value
module
Types
Value
A value in a column
type Value = boolean | none | number | string
Functions
No functions are defined.