Index
Modules:
ozark
,
ozark/collection
,
ozark/database
,
ozark/model
,
ozark/private/types
,
ozark/query
.
API symbols
`$`:
query: proc `$`(sql: SqlQuery): string
`[]=`:
database: proc `[]=`(db: Ozark; id: string; dbCon: DBConnection)
`[]`:
collection: proc `[]`[T](col: Collection[T]; index: int): T
acquireConn:
database: proc acquireConn(pool: DBConnectionPool; timeoutMs: int = 5000): DbConn
add:
database: proc add(db: Ozark; id: string; dbCon: DBConnection)
BigInt:
types: DataType.BigInt
BigSerial:
types: DataType.BigSerial
Bit:
types: DataType.Bit
BitVarying:
types: DataType.BitVarying
Boolean:
types: DataType.Boolean
Box:
types: DataType.Box
Bytea:
types: DataType.Bytea
Char:
types: DataType.Char
Cidr:
types: DataType.Cidr
Circle:
types: DataType.Circle
closeOzarkPool:
database: proc closeOzarkPool()
Collection:
collection: object Collection
contains:
collection: proc contains[T](col: Collection[T]; key, val: string): bool
DataType:
types: enum DataType
Date:
types: DataType.Date
DBConnection:
database: type DBConnection
DBConnectionPool:
database: type DBConnectionPool
DBConnections:
database: type DBConnections
DBDriver:
database: enum DBDriver
DoublePrecision:
types: DataType.DoublePrecision
dropTable:
query: macro dropTable(modelName: untyped; cascade: static bool = false): untyped
Enum:
types: DataType.Enum
exec:
query: macro exec(sql: untyped)
execGet:
query: macro execGet(sql: untyped): untyped
exists:
query: macro exists(tableName: untyped)
first:
collection: proc first[T](col: Collection[T]): T
get:
collection: proc get[T](col: Collection[T]; index: int): T
query: macro get(sql: untyped): untyped
getAll:
collection: proc getAll[T](col: Collection[T]): lent seq[T]
query: macro getAll(sql: untyped): untyped
getDatatype:
model: proc getDatatype(dt: string): (DataType, Option[seq[string]])
getInstance:
database: proc getInstance(): ptr Ozark
getTableName:
model: proc getTableName(id: string): string
Inet:
types: DataType.Inet
initOzarkDatabase:
database: proc initOzarkDatabase(address, name, user, password: string; port: Port = Port(5432); driver: DBDriver = DBDriver.PostgreSQLDriver)
initOzarkPool:
database: proc initOzarkPool(size: Positive = 10)
insert:
query: macro insert(tableName, data: untyped): untyped
Int:
types: DataType.Int
Int4:
types: DataType.Int4
Interval:
types: DataType.Interval
isEmpty:
collection: proc isEmpty[T](col: Collection[T]): bool
items:
collection: iterator items[T](col: Collection[T]): T
Json:
types: DataType.Json
Jsonb:
types: DataType.Jsonb
len:
collection: proc len[T](col: Collection[T]): int
limit:
query: macro limit(sql: untyped; count: untyped): untyped
Line:
types: DataType.Line
Lseg:
types: DataType.Lseg
Macaddr:
types: DataType.Macaddr
Macaddr8:
types: DataType.Macaddr8
mitems:
collection: iterator mitems[T](col: Collection[T]): var T
Model:
model: object Model
Models:
model: var Models
ModelsTable:
model: object ModelsTable
Money:
types: DataType.Money
MYSQLDriver:
database: DBDriver.MYSQLDriver
newModel:
model: macro newModel(id, fields: untyped)
Numeric:
types: DataType.Numeric
orderBy:
query: macro orderBy(sql: untyped; col: static string; desc: static bool = false): untyped
orWhere:
query: macro orWhere(sql: untyped; col: static string; val: untyped): untyped
orWhereNot:
query: macro orWhereNot(sql: untyped; col: static string; val: untyped): untyped
OzarkModelDefect:
query: object OzarkModelDefect
Path:
types: DataType.Path
PGLsn:
types: DataType.PGLsn
PGSnapshot:
types: DataType.PGSnapshot
Point:
types: DataType.Point
Polygon:
types: DataType.Polygon
PostgreSQLDriver:
database: DBDriver.PostgreSQLDriver
prepareTable:
query: macro prepareTable(modelName): untyped
rawSQL:
query: macro rawSQL(models: ptr ModelsTable; sql: static string; values: varargs[untyped]): untyped
Real:
types: DataType.Real
releaseConn:
database: proc releaseConn(pool: DBConnectionPool; conn: DbConn)
removeRow:
query: macro removeRow(tableName: untyped): untyped
SchemaTable:
model: type SchemaTable
select:
query: macro select(tableName: untyped; cols: static openArray[string]): untyped
query: macro select(tableName: untyped; col: static string): untyped
selectAll:
query: macro selectAll(tableName: untyped): untyped
Serial:
types: DataType.Serial
SmallInt:
types: DataType.SmallInt
SmallSerial:
types: DataType.SmallSerial
SQLiteDriver:
database: DBDriver.SQLiteDriver
SqlSchemas:
model: var SqlSchemas
StaticSchemas:
model: const StaticSchemas
table:
query: template table(models: ptr ModelsTable; name): untyped
Text:
types: DataType.Text
Time:
types: DataType.Time
Timestamp:
types: DataType.Timestamp
TimestampTz:
types: DataType.TimestampTz
Timezone:
types: DataType.Timezone
tryInsertID:
query: proc tryInsertID(db: DbConn; query: SqlPrepared; args: varargs[string, `$`]): int64
TsQuery:
types: DataType.TsQuery
TsVector:
types: DataType.TsVector
update:
query: macro update(tableName, data: untyped): untyped
Uuid:
types: DataType.Uuid
Varchar:
types: DataType.Varchar
where:
query: macro where(sql: untyped; col: static string; val: untyped): untyped
whereEndsLike:
query: macro whereEndsLike(sql: untyped; col: static string; val: untyped): untyped
whereIn:
query: macro whereIn(sql: untyped; col: static string; vals: untyped): untyped
whereLike:
query: macro whereLike(sql: untyped; col: static string; val: untyped): untyped
whereNot:
query: macro whereNot(sql: untyped; col: static string; val: untyped): untyped
whereNotEndsLike:
query: macro whereNotEndsLike(sql: untyped; col: static string; val: untyped): untyped
whereNotIn:
query: macro whereNotIn(sql: untyped; col: static string; vals: untyped): untyped
whereNotLike:
query: macro whereNotLike(sql: untyped; col: static string; val: untyped): untyped
whereNotStartsLike:
query: macro whereNotStartsLike(sql: untyped; col: static string; val: untyped): untyped
whereStartsLike:
query: macro whereStartsLike(sql: untyped; col: static string; val: untyped): untyped
withDatabase:
database: macro withDatabase(id: static string; body: untyped)
withDB:
database: macro withDB(body: untyped)
withDBPool:
database: macro withDBPool(body: untyped)
withTableCheck:
query: template withTableCheck(name: NimNode; body)