docs: remove most stale links; refs #9109

This commit is contained in:
Araq
2018-09-29 11:23:29 +02:00
committed by ringabout
parent 16c646c816
commit 541d93bd90

View File

@@ -183,7 +183,7 @@ proc sqlGetDBMS(db: var DbConn): string {.
db.sqlCheck(SQLGetInfo(db.hDb, SQL_DBMS_NAME, cast[SqlPointer](buf.addr),
4095.TSqlSmallInt, sz.addr))
except: discard
return $buf.cstring
return $(addr buf)
proc dbQuote*(s: string): string {.noSideEffect.} =
## DB quotes the string.
@@ -201,10 +201,7 @@ proc dbFormat(formatstr: SqlQuery, args: varargs[string]): string {.
var a = 0
for c in items(string(formatstr)):
if c == '?':
if args[a] == nil:
add(result, "NULL")
else:
add(result, dbQuote(args[a]))
add(result, dbQuote(args[a]))
inc(a)
else:
add(result, c)
@@ -303,7 +300,7 @@ iterator fastRows*(db: var DbConn, query: SqlQuery,
buf[0] = '\0'
db.sqlCheck(SQLGetData(db.stmt, colId.SqlUSmallInt, SQL_C_CHAR,
cast[cstring](buf.addr), 4095.TSqlSmallInt, sz.addr))
rowRes[colId-1] = $buf.cstring
rowRes[colId-1] = $(addr buf)
cCnt = tempcCnt
yield rowRes
res = SQLFetch(db.stmt)
@@ -338,7 +335,7 @@ iterator instantRows*(db: var DbConn, query: SqlQuery,
buf[0] = '\0'
db.sqlCheck(SQLGetData(db.stmt, colId.SqlUSmallInt, SQL_C_CHAR,
cast[cstring](buf.addr), 4095.TSqlSmallInt, sz.addr))
rowRes[colId-1] = $buf.cstring
rowRes[colId-1] = $(addr buf)
cCnt = tempcCnt
yield (row: rowRes, len: cCnt.int)
res = SQLFetch(db.stmt)
@@ -380,7 +377,7 @@ proc getRow*(db: var DbConn, query: SqlQuery,
buf[0] = '\0'
db.sqlCheck(SQLGetData(db.stmt, colId.SqlUSmallInt, SQL_C_CHAR,
cast[cstring](buf.addr), 4095.TSqlSmallInt, sz.addr))
rowRes[colId-1] = $buf.cstring
rowRes[colId-1] = $(addr buf)
cCnt = tempcCnt
res = SQLFetch(db.stmt)
result = rowRes
@@ -415,7 +412,7 @@ proc getAllRows*(db: var DbConn, query: SqlQuery,
buf[0] = '\0'
db.sqlCheck(SQLGetData(db.stmt, colId.SqlUSmallInt, SQL_C_CHAR,
cast[cstring](buf.addr), 4095.TSqlSmallInt, sz.addr))
rowRes[colId-1] = $buf.cstring
rowRes[colId-1] = $(addr buf)
cCnt = tempcCnt
rows.add(rowRes)
res = SQLFetch(db.stmt)