Index
Modules:
amysql
,
amysql/async_pool
,
amysql/async_varargs
,
amysql/conn
,
amysql/conn_connection
,
amysql/db_pool
,
amysql/private/auth
,
amysql/private/cap
,
amysql/private/conn_auth
,
amysql/private/errors
,
amysql/private/format
,
amysql/private/json_sql_format
,
amysql/private/my_geometry
,
amysql/private/protocol
,
amysql/private/quote
,
amysql/private/utils
.
API symbols
`$`:
amysql: `$`(v: ResultValue): string
conn: `$`(conn: Connection): string
conn: `$`(ver: Version): string
`>`:
conn: `>`(ver: Version; ver2: Version): bool
`<=`:
conn: `<=`(ver: Version; ver2: Version): bool
`<`:
conn: `<`(ver: Version; ver2: Version): bool
`==`:
conn: `==`(ver: Version; ver2: Version): bool
my_geometry: `==`(a, b: MyGeometry): bool
asBool:
amysql: asBool(v: ResultValue): bool
asDate:
amysql: asDate(v: ResultValue): Date
asDateTime:
amysql: asDateTime(v: ResultValue): DateTime
asDouble:
amysql: asDouble(v: ResultValue): float64
asDuration:
amysql: asDuration(v: ResultValue): Duration
asFloat:
amysql: asFloat(v: ResultValue): float32
asInt:
amysql: asInt(v: ResultValue): int
asInt64:
amysql: asInt64(v: ResultValue): int64
asInt8:
amysql: asInt8(v: ResultValue): int8
asJson:
amysql: asJson(v: ResultValue): JsonNode
asMyGeometry:
amysql: asMyGeometry(v: ResultValue): MyGeometry
asParam:
amysql: asParam(b: bool): SqlParam
amysql: asParam(d: Date): SqlParam
amysql: asParam(d: DateTime): SqlParam
amysql: asParam(d: Duration): SqlParam
amysql: asParam(f: float32): SqlParam
amysql: asParam(f: float64): SqlParam
amysql: asParam(i: int): SqlParam
amysql: asParam(i: int64): SqlParam
amysql: asParam(d: JsonNode): SqlParam
amysql: asParam(d: MyGeometry): SqlParam
amysql: asParam(s: string): SqlParam
amysql: asParam(d: Time): SqlParam
amysql: asParam(i: uint): SqlParam
amysql: asParam(i: uint64): SqlParam
amysql: asParam(s: untyped): untyped
asString:
amysql: asString(v: ResultValue): string
asTime:
amysql: asTime(v: ResultValue): Time
asUInt:
amysql: asUInt(v: ResultValue): uint
asUint64:
amysql: asUint64(v: ResultValue): uint64
AsyncPool:
async_pool: AsyncPool
asyncVarargs:
async_varargs: asyncVarargs(prc: untyped): untyped
BasicClientCaps:
conn: BasicClientCaps
cachedProperty:
utils: cachedProperty(s: string; prc: untyped): untyped
caching_sha2_password_auth:
conn_auth: caching_sha2_password_auth(conn: Connection; scrambleBuff, password: string): owned( Future[void])
Cap:
cap: Cap
Charset_utf8_ci:
protocol: Charset_utf8_ci
checkEof:
protocol: checkEof(conn: Connection)
close:
async_pool: close(pool: AsyncPool): owned(Future[void])
conn_connection: close(conn: Connection): Future[void]
db_pool: close(self: DBConn): owned(Future[void])
db_pool: close(self: DBPool): Future[void]
ColumnDefinition:
protocol: ColumnDefinition
Command:
protocol: Command
commit:
amysql: commit(conn: Connection): owned(Future[void])
Connection:
conn: Connection
ConnectionObj:
conn: ConnectionObj
countLenInt:
protocol: countLenInt(val: int | uint | int32 | uint32): int
CursorType:
protocol: CursorType
data:
my_geometry: data(self: MyGeometry): lent string
Date:
amysql: Date
DBConn:
db_pool: DBConn
dbFormat:
format: dbFormat(formatstr: SqlQuery; args: varargs[string] | seq[string]): string
DBPool:
db_pool: DBPool
dbQuote:
quote: dbQuote(s: string): string
DBSqlPrepared:
db_pool: DBSqlPrepared
establishConnection:
conn_connection: establishConnection(sock: AsyncSocket; username: string; password: string = ""; database: string = ""; connectAttrs: Table[string, string] = default( Table[string, string])): Future[Connection]
exec:
amysql: exec(conn: Connection; qs: SqlQuery; args: varargs[string, `$`]): Future[ ResultSet[string]]
async_pool: exec(pool: AsyncPool; qs: SqlQuery; args: varargs[string, `$`]): Future[ ResultSet[string]]
db_pool: exec(conn: DBPool; query: SqlQuery; args: varargs[string, `$`]): Future[ ResultSet[string]]
expired:
db_pool: expired(self: DBConn; timeout: Duration): bool
fetchConn:
db_pool: fetchConn(self: DBPool): Future[DBConn]
FieldFlag:
protocol: FieldFlag
FieldType:
protocol: FieldType
fieldTypeBit:
FieldType.fieldTypeBit
fieldTypeBlob:
FieldType.fieldTypeBlob
fieldTypeDate:
FieldType.fieldTypeDate
fieldTypeDateTime:
FieldType.fieldTypeDateTime
fieldTypeDecimal:
FieldType.fieldTypeDecimal
fieldTypeDouble:
FieldType.fieldTypeDouble
fieldTypeEnum:
FieldType.fieldTypeEnum
fieldTypeFloat:
FieldType.fieldTypeFloat
fieldTypeGeometry:
FieldType.fieldTypeGeometry
fieldTypeInt24:
FieldType.fieldTypeInt24
fieldTypeJson:
FieldType.fieldTypeJson
fieldTypeLong:
FieldType.fieldTypeLong
fieldTypeLongBlob:
FieldType.fieldTypeLongBlob
fieldTypeLongLong:
FieldType.fieldTypeLongLong
fieldTypeMediumBlob:
FieldType.fieldTypeMediumBlob
fieldTypeNewDecimal:
FieldType.fieldTypeNewDecimal
fieldTypeNull:
FieldType.fieldTypeNull
fieldTypeSet:
FieldType.fieldTypeSet
fieldTypeShort:
FieldType.fieldTypeShort
fieldTypeString:
FieldType.fieldTypeString
fieldTypeTime:
FieldType.fieldTypeTime
fieldTypeTimestamp:
FieldType.fieldTypeTimestamp
fieldTypeTiny:
FieldType.fieldTypeTiny
fieldTypeTinyBlob:
FieldType.fieldTypeTinyBlob
fieldTypeVarchar:
FieldType.fieldTypeVarchar
fieldTypeVarString:
FieldType.fieldTypeVarString
fieldTypeYear:
FieldType.fieldTypeYear
finalize:
amysql: finalize(conn: Connection; pstmt: SqlPrepared): Future[void]
db_pool: finalize(self: DBPool; pstmt: DBSqlPrepared): Future[void]
firstByte:
conn: firstByte(conn: Connection): lent char
formatBoundParams:
amysql: formatBoundParams(conn: Connection; pstmt: SqlPrepared; params: openArray[SqlParam]): string
fromWkb:
my_geometry: fromWkb(srid: int; wkb: sink string): MyGeometry
getAllRows:
amysql: getAllRows(conn: Connection; qs: SqlQuery; args: varargs[string, `$`]): Future[ seq[Row]]
async_pool: getAllRows(pool: AsyncPool; qs: SqlQuery; args: varargs[string, `$`]): Future[ seq[Row]]
db_pool: getAllRows(conn: DBPool; query: SqlQuery; args: varargs[string, `$`]): Future[ seq[Row]]
getDatabaseVersion:
conn: getDatabaseVersion(self: Connection): Version
getFreeConn:
async_pool: getFreeConn(pool: AsyncPool; conIdx: int): Connection
getFreeConnIdx:
async_pool: getFreeConnIdx(pool: AsyncPool): Future[int]
getPayloadLen:
conn: getPayloadLen(conn: Connection): int
getRow:
amysql: getRow(conn: Connection; qs: SqlQuery; args: varargs[string, `$`]): Future[Row]
async_pool: getRow(pool: AsyncPool; qs: SqlQuery; args: varargs[string, `$`]): Future[Row]
db_pool: getRow(conn: DBPool; query: SqlQuery; args: varargs[string, `$`]): Future[Row]
getValue:
amysql: getValue(conn: Connection; qs: SqlQuery; args: varargs[string, `$`]): Future[ string]
async_pool: getValue(pool: AsyncPool; qs: SqlQuery; args: varargs[string, `$`]): Future[ string]
db_pool: getValue(conn: DBPool; query: SqlQuery; args: varargs[string, `$`]): Future[ string]
HandshakePacket:
protocol: HandshakePacket
hexdump:
protocol: hexdump(buf: openArray[char]; fp: File)
incPos:
conn: incPos(conn: Connection; count = 1)
initDate:
amysql: initDate(monthday: MonthdayRange; month: Month; year: int; zone: Timezone = local()): Date
insert:
amysql: insert(conn: Connection; qs: SqlQuery; pkName: string; args: varargs[string, `$`]): Future[int64]
async_pool: insert(pool: AsyncPool; qs: SqlQuery; pkName: string; args: varargs[string, `$`]): Future[ int64]
db_pool: insert(conn: DBPool; query: SqlQuery; pkName: string; args: varargs[string, `$`]): Future[ int64]
insertId:
amysql: insertId(conn: Connection; qs: SqlQuery; args: varargs[string, `$`]): Future[ int64]
async_pool: insertId(pool: AsyncPool; qs: SqlQuery; args: varargs[string, `$`]): Future[ int64]
db_pool: insertId(conn: DBPool; query: SqlQuery; args: varargs[string, `$`]): Future[ int64]
isAuthSwitchRequestPacket:
protocol: isAuthSwitchRequestPacket(conn: Connection): bool
isEOF:
protocol: isEOF(stats: ResponseOK): bool
isEOFPacket:
protocol: isEOFPacket(conn: Connection): bool
isEOFPacketFollowed:
protocol: isEOFPacketFollowed(conn: Connection): bool
isERRPacket:
protocol: isERRPacket(conn: Connection): bool
isExtraAuthDataPacket:
protocol: isExtraAuthDataPacket(conn: Connection): bool
isLocalInfileRequestPacket:
protocol: isLocalInfileRequestPacket(conn: Connection): bool
isMaria:
conn: isMaria(self: Connection): bool
isNull:
amysql: isNull(v: ResultValue): bool
isOKPacket:
protocol: isOKPacket(conn: Connection): bool
MyGeometry:
my_geometry: MyGeometry
MysqlBufSize:
conn: MysqlBufSize
newAsyncPool:
async_pool: newAsyncPool(uriStr: string | Uri; num: int): Future[AsyncPool]
async_pool: newAsyncPool(host, user, password, database: string; num: int): Future[AsyncPool]
newDBConn:
db_pool: newDBConn(writer: ptr Channel[DBResult]): DBConn
newDBPool:
db_pool: newDBPool(uriStr: string | Uri): Future[DBPool]
newMyGeometry:
my_geometry: newMyGeometry(data: sink string): MyGeometry
NullColumn:
protocol: NullColumn
open:
conn_connection: open(uriStr: string | uri.Uri): Future[Connection]
conn_connection: open(connection, user, password: string; database = ""; connectAttrs: Table[string, string] = default(Table[string, string])): Future[ Connection]
parseAuthSwitchPacket:
protocol: parseAuthSwitchPacket(conn: Connection): ref ResponseAuthSwitch
parseEOFPacket:
protocol: parseEOFPacket(conn: Connection): ResponseOK
parseErrorPacket:
protocol: parseErrorPacket(conn: Connection): ref ResponseERR
parseHandshakePacket:
protocol: parseHandshakePacket(conn: Connection): HandshakePacket
parseLocalInfileRequestPacket:
protocol: parseLocalInfileRequestPacket(conn: Connection): string
parseOKPacket:
protocol: parseOKPacket(conn: Connection): ResponseOK
parseResponseAuthMorePacket:
protocol: parseResponseAuthMorePacket(conn: Connection; pkt: string): ref ResponseAuthMore
performPreparedQuery:
amysql: performPreparedQuery(conn: Connection; pstmt: SqlPrepared; st: Future[void]; onlyFirst: static[bool] = false): Future[ ResultSet[ResultValue]]
plugin_auth:
auth: plugin_auth(plugin_name, scramble, password: string): string
prepare:
amysql: prepare(conn: Connection; qs: string): Future[SqlPrepared]
db_pool: prepare(self: DBPool; query: string): Future[DBSqlPrepared]
printBufInfo:
conn: printBufInfo(conn: Connection)
processMetadata:
protocol: processMetadata(conn: Connection; meta: var seq[ColumnDefinition]; index: int)
ProtocolError:
errors: ProtocolError
putDate:
protocol: putDate(buf: var string; val: DateTime): int
putDateTime:
protocol: putDateTime(buf: var string; val: DateTime): int
putDouble:
protocol: putDouble(buf: var string; val: float64)
putFloat:
protocol: putFloat(buf: var string; val: float32)
putLenInt:
protocol: putLenInt(buf: var string; val: int | uint | int32 | uint32): int
putLenStr:
protocol: putLenStr(buf: var string; val: string)
putNulString:
protocol: putNulString(buf: var string; val: string)
putS64:
protocol: putS64(buf: var string; val: int64)
putTime:
protocol: putTime(buf: var string; val: Duration): int
putTimestamp:
protocol: putTimestamp(buf: var string; val: DateTime): int
putU16:
protocol: putU16(buf: var string; val: uint16)
putU32:
protocol: putU32(buf: var string; val: uint32)
putU64:
protocol: putU64(buf: var string; val: uint64)
putU8:
protocol: putU8(buf: var string; val: range[0 .. 255])
putValue:
protocol: putValue(buf: var string; intVal: int64)
protocol: putValue(buf: var string; intVal: uint64)
query:
amysql: query(conn: Connection; pstmt: SqlPrepared; params: openArray[static[SqlParam]]): Future[ void]
amysql: query(conn: Connection; pstmt: SqlPrepared; params: varargs[SqlParam, asParam]): Future[ ResultSet[ResultValue]]
amysql: query(conn: Connection; qs: SqlQuery; onlyFirst: static[bool] = false; args: varargs[string, `$`]): Future[ResultSet[string]]
async_pool: query(pool: AsyncPool; pstmt: SqlPrepared; params: openArray[static[SqlParam]]): Future[ void]
async_pool: query(pool: AsyncPool; pstmt: SqlPrepared; params: varargs[SqlParam, asParam]): Future[ ResultSet[ResultValue]]
async_pool: query(pool: AsyncPool; qs: SqlQuery; args: varargs[string, `$`]; onlyFirst: static[bool] = false): Future[ResultSet[string]]
db_pool: query(self: DBPool; pstmt: DBSqlPrepared; params: varargs[SqlParam, asParam]): Future[ ResultSet[ResultValue]]
db_pool: query(conn: DBPool; query: SqlQuery; args: varargs[string, `$`]; onlyFirst: static[bool] = false): Future[ResultSet[string]]
rawExec:
amysql: rawExec(conn: Connection; qs: string): Future[ResultSet[string]]
async_pool: rawExec(pool: AsyncPool; qs: string): Future[ResultSet[string]]
db_pool: rawExec(self: DBPool; query: string): Future[ResultSet[string]]
rawQuery:
amysql: rawQuery(conn: Connection; qs: string; onlyFirst: bool = false): Future[ ResultSet[string]]
async_pool: rawQuery(pool: AsyncPool; qs: string; onlyFirst: bool = false): Future[ ResultSet[string]]
db_pool: rawQuery(self: DBPool; query: string; onlyFirst: static[bool] = false): Future[ ResultSet[string]]
readDateTime:
protocol: readDateTime(buf: openArray[char]; pos: var int; zone: Timezone = utc()): DateTime
readLenInt:
protocol: readLenInt(buf: openArray[char]; pos: var int): int
readLenStr:
protocol: readLenStr(buf: openArray[char]; pos: var int): string
readNulString:
protocol: readNulString(buf: openArray[char]; pos: var int): string
readNulStringX:
protocol: readNulStringX(buf: openArray[char]; pos: var int): string
readTime:
protocol: readTime(buf: openArray[char]; pos: var int): Duration
receiveMetadata:
protocol: receiveMetadata(conn: Connection; count: Positive): Future[seq[ColumnDefinition]]
receivePacket:
protocol: receivePacket(conn: Connection; drop_ok: bool = false): owned(Future[void])
remainPacketLen:
conn: remainPacketLen(conn: Connection): int
reset:
amysql: reset(conn: Connection): Future[ResultSet[string]]
amysql: reset(conn: Connection; pstmt: SqlPrepared): Future[void]
db_pool: reset(self: DBPool; pstmt: DBSqlPrepared): Future[void]
ResetConnection:
amysql: ResetConnection
resetPacketLen:
conn: resetPacketLen(conn: Connection)
ResponseAuthMore:
protocol: ResponseAuthMore
ResponseAuthSwitch:
protocol: ResponseAuthSwitch
ResponseCode_AuthSwitchRequest:
protocol: ResponseCode_AuthSwitchRequest
ResponseCode_EOF:
protocol: ResponseCode_EOF
ResponseCode_ERR:
protocol: ResponseCode_ERR
ResponseCode_ExtraAuthData:
protocol: ResponseCode_ExtraAuthData
ResponseCode_LOCAL_INFILE:
protocol: ResponseCode_LOCAL_INFILE
ResponseCode_OK:
protocol: ResponseCode_OK
ResponseERR:
protocol: ResponseERR
ResponseOK:
protocol: ResponseOK
ResultSet:
protocol: ResultSet
ResultValue:
amysql: ResultValue
returnConn:
async_pool: returnConn(pool: AsyncPool; conIdx: int)
rollback:
amysql: rollback(conn: Connection): owned(Future[void])
roundtrip:
protocol: roundtrip(conn: Connection; data: string): owned(Future[void])
Row:
amysql: Row
scanDouble:
protocol: scanDouble(buf: openArray[char]; pos: int): float64
scanFloat:
protocol: scanFloat(buf: openArray[char]; pos: int): float32
scanU16:
protocol: scanU16(buf: openArray[char]; pos: int): uint16
scanU32:
protocol: scanU32(buf: openArray[char]; pos: int): uint32
scanU64:
protocol: scanU64(buf: openArray[char]; pos: int): uint64
scramble323:
auth: scramble323(seed: string; password: string): string
scramble_caching_sha2:
auth: scramble_caching_sha2(scrambleBuff: string; password: string): string
scramble_native_password:
auth: scramble_native_password(scrambleBuff: string; password: string): string
selectDatabase:
amysql: selectDatabase(conn: Connection; database: string): Future[ResponseOK]
async_pool: selectDatabase(pool: AsyncPool; database: string): Future[ResponseOK]
sendEmptyPacket:
protocol: sendEmptyPacket(conn: Connection): Future[void]
sendFile:
protocol: sendFile(conn: Connection; filename: string): Future[void]
sendPacket:
protocol: sendPacket(conn: Connection; buf: sink string; resetSeqId = false): Future[void]
sendQuery:
protocol: sendQuery(conn: Connection; query: string): Future[void]
SessionState:
protocol: SessionState
SessionStateType:
protocol: SessionStateType
setEncoding:
amysql: setEncoding(conn: Connection; encoding: string): Future[bool]
setInt32:
protocol: setInt32(buf: var openArray[char]; pos: int; value: int)
sqlFormat:
json_sql_format: sqlFormat(conn: Connection; node: JsonNode): string
SqlParam:
amysql: SqlParam
SqlPrepared:
amysql: SqlPrepared
srid:
my_geometry: srid(self: MyGeometry): int
startTransaction:
amysql: startTransaction(conn: Connection): owned(Future[void])
TestWhileIdle:
conn: TestWhileIdle
toBoolean:
conn: toBoolean(ver: Version): bool
transaction:
amysql: transaction(conn: typed; process: untyped)
tryInsert:
amysql: tryInsert(conn: Connection; qs: SqlQuery; pkName: string; args: varargs[string, `$`]): Future[int64]
async_pool: tryInsert(pool: AsyncPool; qs: SqlQuery; pkName: string; args: varargs[string, `$`]): Future[int64]
db_pool: tryInsert(conn: DBPool; query: SqlQuery; pkName: string; args: varargs[string, `$`]): Future[int64]
tryInsertId:
amysql: tryInsertId(conn: Connection; qs: SqlQuery; args: varargs[string, `$`]): Future[ int64]
async_pool: tryInsertId(pool: AsyncPool; qs: SqlQuery; args: varargs[string, `$`]): Future[ int64]
db_pool: tryInsertId(conn: DBPool; query: SqlQuery; args: varargs[string, `$`]): Future[ int64]
tryQuery:
amysql: tryQuery(conn: Connection; qs: SqlQuery; args: varargs[string, `$`]): Future[ bool]
async_pool: tryQuery(pool: AsyncPool; qs: SqlQuery; args: varargs[string, `$`]): Future[bool]
db_pool: tryQuery(conn: DBPool; query: SqlQuery; args: varargs[string, `$`]): Future[bool]
use_zstd:
conn: use_zstd(conn: Connection): bool
Version:
conn: Version
wkb:
my_geometry: wkb(self: MyGeometry): string
writeHandshakeResponse:
protocol: writeHandshakeResponse(conn: Connection; username: string; auth_response: string; database: string; auth_plugin: string): Future[void]
writeTypeAndFlag:
protocol: writeTypeAndFlag(buf: var string; fieldType: FieldType)
protocol: writeTypeAndFlag(buf: var string; intVal: int64)
protocol: writeTypeAndFlag(buf: var string; intVal: uint64)
zeroPos:
conn: zeroPos(conn: Connection)
zstdAvailable:
conn: zstdAvailable(conn: Connection): bool