Index
Modules:
fiber_orm
,
fiber_orm/pool
,
fiber_orm/util
.
API symbols
columnNamesForModel:
util: columnNamesForModel(modelType: typed): seq[string]
createParseStmt:
util: createParseStmt(t, value: NimNode): NimNode
createRecord:
fiber_orm: createRecord[T](db: DbConn; rec: T): T
DbConnPool:
pool: DbConnPool
DbConnPoolConfig:
pool: DbConnPoolConfig
dbFormat:
util: dbFormat(dt: DateTime): string
util: dbFormat[T](list: seq[T]): string
util: dbFormat(s: string): string
util: dbFormat[T](item: T): string
dbNameToIdent:
util: dbNameToIdent(name: string): string
deleteRecord:
fiber_orm: deleteRecord[T](db: DbConn; rec: T): bool
fiber_orm: deleteRecord(db: DbConn; modelType: type; id: typed): untyped
findRecordsBy:
fiber_orm: findRecordsBy(db: DbConn; modelType: type; lookups: seq[tuple[field: string, value: string]]): untyped
findRecordsWhere:
fiber_orm: findRecordsWhere(db: DbConn; modelType: type; whereClause: string; values: varargs[string, dbFormat]): untyped
generateLookup:
fiber_orm: generateLookup(dbType: type; modelType: type; fields: seq[string]): untyped
generateProcsForFieldLookups:
fiber_orm: generateProcsForFieldLookups(dbType: type; modelsAndFields: openArray[ tuple[t: type, fields: seq[string]]]): untyped
generateProcsForModels:
fiber_orm: generateProcsForModels(dbType: type; modelTypes: openArray[type]): untyped
getAllRecords:
fiber_orm: getAllRecords(db: DbConn; modelType: type): untyped
getRecord:
fiber_orm: getRecord(db: DbConn; modelType: type; id: typed): untyped
identNameToDb:
util: identNameToDb(name: string): string
initDbConnPool:
pool: initDbConnPool(cfg: DbConnPoolConfig): DbConnPool
initPool:
fiber_orm: initPool(connect: proc (): DbConn; poolSize = 10; hardCap = false; healthCheckQuery = "SELECT \'true\' AS alive"): DbConnPool
inTransaction:
fiber_orm: inTransaction(db: DbConnPool; body: untyped)
listFields:
util: listFields(t: typed): untyped
modelName:
util: modelName(model: object): string
util: modelName(modelType: type): string
MutateClauses:
util: MutateClauses
NotFoundError:
fiber_orm: NotFoundError
parseDbArray:
util: parseDbArray(val: string): seq[string]
parsePGDatetime:
util: parsePGDatetime(val: string): DateTime
pluralize:
util: pluralize(name: string): string
populateMutateClauses:
util: populateMutateClauses(t: typed; newRecord: bool; mc: var MutateClauses): untyped
release:
pool: release(pool: DbConnPool; connId: int): void
rowToModel:
util: rowToModel(modelType: typed; row: seq[string]): untyped
tableName:
util: tableName[T](rec: T): string
util: tableName(modelType: type): string
take:
pool: take(pool: DbConnPool): tuple[id: int, conn: DbConn]
typeOfColumn:
util: typeOfColumn(modelType: NimNode; colName: string): NimNode
updateRecord:
fiber_orm: updateRecord[T](db: DbConn; rec: T): bool
walkFieldDefs:
util: walkFieldDefs(t: NimNode; body: untyped)
withConn:
pool: withConn(pool: DbConnPool; stmt: untyped): untyped