☰
Index
Modules:
ozark
,
ozark/collection
,
ozark/driver/dbmeta
,
ozark/driver/private/types
,
ozark/migration
,
ozark/model
,
ozark/query
.
API symbols
`$`:
query: proc `$`(sql: SqlQuery): string
`[]`:
collection: proc `[]`[T](col: Collection[T]; index: int): T
appendSqlArgs:
types: proc appendSqlArgs(callNode: var NimNode; args: NimNode)
Asc:
query: Order.Asc
avgOf:
query: macro avgOf(sql: untyped; col: static string): untyped
BigInt:
types: DataType.BigInt
BigSerial:
types: DataType.BigSerial
Bit:
types: DataType.Bit
BitVarying:
types: DataType.BitVarying
Blob:
types: DataType.Blob
Boolean:
types: DataType.Boolean
Box:
types: DataType.Box
Bytea:
types: DataType.Bytea
Char:
types: DataType.Char
Cidr:
types: DataType.Cidr
Circle:
types: DataType.Circle
Collection:
collection: object Collection
contains:
collection: proc contains[T](col: Collection[T]; key, val: string): bool
count:
query: macro count(sql: untyped): untyped
countDistinct:
query: macro countDistinct(sql: untyped; col: static string): untyped
countSqlArgs:
types: proc countSqlArgs(args: NimNode): int
DataType:
types: enum DataType
Date:
types: DataType.Date
decrement:
query: macro decrement(modelTuple: untyped; col: static string; n: static int = 1): untyped
Desc:
query: Order.Desc
DoublePrecision:
types: DataType.DoublePrecision
dropTable:
query: macro dropTable(modelTuple: untyped; cascade: static bool = false): untyped
ensureStage:
query: proc ensureStage(sql: NimNode; allowed: openArray[string]; caller: string)
Enum:
types: DataType.Enum
exists:
query: macro exists(x: untyped): untyped
extractSQL:
query: macro extractSQL(sql: NimNode): untyped
findById:
query: macro findById(modelTuple: untyped; id: untyped): untyped
first:
collection: proc first[T](col: Collection[T]): T
query: macro first(sql: untyped): untyped
fromSQL:
query: macro fromSQL(sql: untyped): untyped
get:
collection: proc get[T](col: Collection[T]; index: int): T
getAll:
collection: proc getAll[T](col: Collection[T]): lent seq[T]
getDatatype:
model: proc getDatatype(dt: string): (DataType, Option[seq[string]])
getDriverType:
types: proc getDriverType(n: NimNode): SqlDriver
getPlaceholder:
query: proc getPlaceholder(modelTuple: NimNode; idx: int = 1): string
getSqlDriver:
dbmeta: proc getSqlDriver(name: static string = "main"): SqlDriver
getTableName:
model: proc getTableName(id: string): string
groupBy:
query: macro groupBy(sql: untyped; cols: static openArray[string]): untyped
having:
query: macro having(sql: untyped; col: static string; val: untyped): untyped
havingGt:
query: macro havingGt(sql: untyped; col: static string; val: untyped): untyped
havingGte:
query: macro havingGte(sql: untyped; col: static string; val: untyped): untyped
havingLt:
query: macro havingLt(sql: untyped; col: static string; val: untyped): untyped
havingLte:
query: macro havingLte(sql: untyped; col: static string; val: untyped): untyped
increment:
query: macro increment(modelTuple: untyped; col: static string; n: static int = 1): untyped
Inet:
types: DataType.Inet
initStaticDriver:
dbmeta: proc initStaticDriver(name: static string; driver: static SqlDriver)
insert:
query: macro insert(modelTuple, data: untyped): untyped
insertMany:
query: macro insertMany(modelTuple: untyped; rows: untyped): untyped
Int:
types: DataType.Int
Int4:
types: DataType.Int4
Integer:
types: DataType.Integer
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
last:
collection: proc last[T](col: Collection[T]): T
query: macro last(sql: untyped): untyped
len:
collection: proc len[T](col: Collection[T]): int
limit:
query: macro limit(sql: untyped; count: static int): untyped
Line:
types: DataType.Line
loadOzarkMigrations:
migration: proc loadOzarkMigrations(manager: PluginManager; dir: string): seq[ OzarkLoadedMigration]
Lseg:
types: DataType.Lseg
Macaddr:
types: DataType.Macaddr
Macaddr8:
types: DataType.Macaddr8
maxOf:
query: macro maxOf(sql: untyped; col: static string): untyped
migrate:
migration: template migrate(dir: string)
migration_info_fn:
migration: type migration_info_fn
migration_run_fn:
migration: type migration_run_fn
migrationStatus:
migration: template migrationStatus(dir: string): seq[OzarkMigrationStatus]
minOf:
query: macro minOf(sql: untyped; col: static string): untyped
mitems:
collection: iterator mitems[T](col: Collection[T]): var T
Model:
model: object Model
Models:
model: var Models
ModelsTable:
model: object ModelsTable
modelSymOf:
query: proc modelSymOf(sql: NimNode): NimNode
modelTupleOf:
query: proc modelTupleOf(sql: NimNode): NimNode
Money:
types: DataType.Money
newMigration:
migration: macro newMigration(name: untyped; body: untyped): untyped
newModel:
model: macro newModel(id, fields: untyped)
normalizeInLists:
query: proc normalizeInLists(sqlText: string; driver: SqlDriver = SqlDriver.generic): string
Numeric:
types: DataType.Numeric
offset:
query: macro offset(sql: untyped; count: static int): untyped
Order:
query: enum Order
orderAscBy:
query: macro orderAscBy(sql: untyped; cols: static openArray[string]): untyped
orderBy:
query: macro orderBy(sql: untyped; cols: static openArray[string]; dir: static Order = Desc): untyped
orderDescBy:
query: macro orderDescBy(sql: untyped; cols: static openArray[string]): untyped
orWhere:
query: macro orWhere(sql: untyped; col: static string; val: untyped): untyped
orWhereBetween:
query: macro orWhereBetween(sql: untyped; col: static string; lo: untyped; hi: untyped): untyped
orWhereEndsLike:
query: macro orWhereEndsLike(sql: untyped; col: static string; val: untyped): untyped
orWhereGt:
query: macro orWhereGt(sql: untyped; col: static string; val: untyped): untyped
orWhereGte:
query: macro orWhereGte(sql: untyped; col: static string; val: untyped): untyped
orWhereIn:
query: macro orWhereIn(sql: untyped; col: static string; vals: untyped): untyped
orWhereLike:
query: macro orWhereLike(sql: untyped; col: static string; val: untyped): untyped
orWhereLt:
query: macro orWhereLt(sql: untyped; col: static string; val: untyped): untyped
orWhereLte:
query: macro orWhereLte(sql: untyped; col: static string; val: untyped): untyped
orWhereNot:
query: macro orWhereNot(sql: untyped; col: static string; val: untyped): untyped
orWhereNotIn:
query: macro orWhereNotIn(sql: untyped; col: static string; vals: untyped): untyped
orWhereNotLike:
query: macro orWhereNotLike(sql: untyped; col: static string; val: untyped): untyped
orWhereStartsLike:
query: macro orWhereStartsLike(sql: untyped; col: static string; val: untyped): untyped
ozarkCreateTableResult:
query: proc ozarkCreateTableResult(sql: static[string]): NimNode
ozarkGroupByResult:
query: proc ozarkGroupByResult(sql: static[string]; vals: seq[string]): NimNode
ozarkHavingResult:
query: proc ozarkHavingResult(sql: static[string]; vals: seq[string]): NimNode
ozarkHoldModel:
query: proc ozarkHoldModel[T](t: T)
query: proc ozarkHoldModel[T: typedesc](t: T)
ozarkInsertResult:
query: proc ozarkInsertResult(sql: static[string]; vals: seq[string]): NimNode
ozarkLimitResult:
query: proc ozarkLimitResult(sql: static[string]; vals: seq[string]): NimNode
OzarkLoadedMigration:
migration: object OzarkLoadedMigration
ozarkMigPlaceholder:
migration: proc ozarkMigPlaceholder(driver, idx: int): string
OzarkMigrationDriverPgsql:
migration: const OzarkMigrationDriverPgsql
OzarkMigrationDriverSqlite:
migration: const OzarkMigrationDriverSqlite
OzarkMigrationError:
migration: object OzarkMigrationError
OzarkMigrationInfo:
migration: object OzarkMigrationInfo
ozarkMigrationSemver:
migration: proc ozarkMigrationSemver(timestamp: string): string
ozarkMigrationsTableDDL:
migration: const ozarkMigrationsTableDDL
OzarkMigrationStatus:
migration: object OzarkMigrationStatus
OzarkMigrationStmt:
migration: tuple OzarkMigrationStmt
ozarkMigrationTimestamp:
migration: proc ozarkMigrationTimestamp(filename: string): string
ozarkMigStmtsFromJson:
migration: proc ozarkMigStmtsFromJson(node: JsonNode): seq[OzarkMigrationStmt]
ozarkMigStmtsToJson:
migration: proc ozarkMigStmtsToJson(stmts: seq[OzarkMigrationStmt]): JsonNode
OzarkModelDefect:
query: object OzarkModelDefect
ozarkOffsetResult:
query: proc ozarkOffsetResult(sql: static[string]; vals: seq[string]): NimNode
ozarkOrderByResult:
query: proc ozarkOrderByResult(sql: static[string]; vals: seq[string]): NimNode
ozarkRawSQLResult:
query: proc ozarkRawSQLResult(sql: static[string]; vals: seq[string]): NimNode
ozarkRemoveResult:
query: proc ozarkRemoveResult(sql: static[string]): NimNode
ozarkRunAt:
migration: proc ozarkRunAt(): string
ozarkSelectResult:
query: proc ozarkSelectResult(sql: static[string]): NimNode
ozarkTxDepth:
query: var ozarkTxDepth
ozarkUpdateResult:
query: proc ozarkUpdateResult(sql: static[string]; vals: seq[string]): NimNode
ozarkUpsertResult:
query: proc ozarkUpsertResult(sql: static[string]; vals: seq[string]): NimNode
ozarkWhereInResult:
query: proc ozarkWhereInResult(sql: static[string]; vals: seq[string]): NimNode
ozarkWhereResult:
query: proc ozarkWhereResult(sql: static[string]; vals: seq[string]): NimNode
paginate:
query: macro paginate(sql: untyped; page: static int; perPage: static int): untyped
paramsBracketOf:
query: proc paramsBracketOf(trailing: NimNode): NimNode
parseOzarkMigrationInfo:
migration: proc parseOzarkMigrationInfo(payload, filepath: string): OzarkMigrationInfo
Path:
types: DataType.Path
PGLsn:
types: DataType.PGLsn
PGSnapshot:
types: DataType.PGSnapshot
pluck:
query: macro pluck(sql: untyped; col: static string): untyped
Point:
types: DataType.Point
Polygon:
types: DataType.Polygon
prepareTable:
query: macro prepareTable(modelTuple): untyped
Real:
types: DataType.Real
rebuildResultCall:
query: proc rebuildResultCall(kindSym: NimNode; sqlText: string; bracket: NimNode): NimNode
removeRow:
query: macro removeRow(modelTuple: untyped): untyped
resultKindOf:
query: proc resultKindOf(callNode: NimNode): string
rollback:
migration: template rollback(dir: string; steps: int = 1)
RuntimeSchemas:
model: type RuntimeSchemas
RuntimeSqlSchemas:
model: var RuntimeSqlSchemas
SchemaTable:
model: type SchemaTable
select:
query: macro select(modelTuple: untyped; cols: static openArray[string]): untyped
query: macro select(modelTuple: untyped; col: static string): untyped
selectAll:
query: macro selectAll(modelTuple: untyped): untyped
selectFamilyResults:
query: const selectFamilyResults
Serial:
types: DataType.Serial
SmallInt:
types: DataType.SmallInt
SmallSerial:
types: DataType.SmallSerial
SqlSchemas:
model: var SqlSchemas
StaticSchemas:
model: const StaticSchemas
sumOf:
query: macro sumOf(sql: untyped; col: static string): untyped
swapResultCall:
query: proc swapResultCall(trailing: NimNode; kindSym: NimNode; newText: string; bracket: NimNode)
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
trailingCallOf:
query: proc trailingCallOf(sql: NimNode): NimNode
truncate:
query: macro truncate(modelTuple: untyped): untyped
TsQuery:
types: DataType.TsQuery
TsVector:
types: DataType.TsVector
unbracket:
query: proc unbracket(n: NimNode): NimNode
unique:
query: macro unique(sql: untyped): untyped
unserializeSchemas:
model: proc unserializeSchemas(jsonSchema: string): RuntimeSchemas
update:
query: macro update(modelTuple, data: untyped): untyped
upsert:
query: macro upsert(modelTuple: untyped; data: untyped; conflictCols: static openArray[string]; updateCols: static openArray[string]): untyped
Uuid:
types: DataType.Uuid
Varchar:
types: DataType.Varchar
where:
query: macro where(sql: untyped; col: static string; vals: untyped): untyped
whereBetween:
query: macro whereBetween(sql: untyped; col: static string; lo: untyped; hi: untyped): untyped
whereEndsLike:
query: macro whereEndsLike(sql: untyped; col: static string; val: untyped): untyped
whereGt:
query: macro whereGt(sql: untyped; col: static string; val: untyped): untyped
whereGte:
query: macro whereGte(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
whereLt:
query: macro whereLt(sql: untyped; col: static string; val: untyped): untyped
whereLte:
query: macro whereLte(sql: untyped; col: static string; val: untyped): untyped
whereNot:
query: macro whereNot(sql: untyped; col: static string; val: untyped): untyped
whereNotBetween:
query: macro whereNotBetween(sql: untyped; col: static string; lo: untyped; hi: 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
whereNotNull:
query: macro whereNotNull(sql: untyped; col: static string): untyped
whereNotStartsLike:
query: macro whereNotStartsLike(sql: untyped; col: static string; val: untyped): untyped
whereNull:
query: macro whereNull(sql: untyped; col: static string): untyped
whereStartsLike:
query: macro whereStartsLike(sql: untyped; col: static string; val: untyped): untyped
withColumn:
query: template withColumn(x: NimNode; col: string; body)
withColumnCheck:
query: template withColumnCheck(model: NimNode; col: string; body)
withColumnsCheck:
query: template withColumnsCheck(model: NimNode; cols: openArray[string]; body)
withOzarkMigrationLibs:
migration: template withOzarkMigrationLibs(dir: string; loaded, body)
withTableCheck:
query: template withTableCheck(modelTuple: NimNode; body)
withTransaction:
query: macro withTransaction(body: untyped): untyped