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