Types
DbConnectionProperty = tuple[key: string, val: string]
DbTableColumnMetaData = object of RootObj
RCode = tuple[vendorcode: int, errStr: string]
- generic returnvalue resultcontainer. the vendorcode can be evaluated by the 'eval' templates
DbConn = object
- the database-connection needed for executing/preparing statements
PreparedStatement = object
- a prepared statement for specific query the statement could be cached by the application to avoid parsing by the db
ResultSet = object
- needed to retrieve the results from the backend
Procs
proc `$`(p: var RCode): string {...}{.raises: [], tags: [].}
- get the string representation of RCode
proc hex2Str(par: var openArray[byte]): string {...}{.raises: [], tags: [].}
proc open(props: var seq[DbConnectionProperty]; outpar: var RCode): DbConn {...}{.raises: [], tags: [].}
- not implemented
proc close(db: DbConn; outpar: var RCode) {...}{.tags: [DbEffect], raises: [].}
- closes the database connection.
Templates
template copyCstrToNewNimStr(resultvar: var string; statement_emit_cstring: untyped) {...}{. dirty.}
- helper template to copy a backends string to a nimstring