diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-05-14 19:58:50 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-05-14 19:58:50 +0200 |
commit | fd0c4577a4b6e85ca2db664906e1a03807ce133f (patch) | |
tree | fa23fcc04248d03ff82e34634b8ef1bb9cf28acb /tex/context/base/mkiv/util-sql-imp-swiglib.lua | |
parent | db581096187dc2d3cbdbe4cdc39d247c168b1607 (diff) | |
download | context-fd0c4577a4b6e85ca2db664906e1a03807ce133f.tar.gz |
2017-05-14 19:15:00
Diffstat (limited to 'tex/context/base/mkiv/util-sql-imp-swiglib.lua')
-rw-r--r-- | tex/context/base/mkiv/util-sql-imp-swiglib.lua | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/tex/context/base/mkiv/util-sql-imp-swiglib.lua b/tex/context/base/mkiv/util-sql-imp-swiglib.lua index af7012392..786b4bffc 100644 --- a/tex/context/base/mkiv/util-sql-imp-swiglib.lua +++ b/tex/context/base/mkiv/util-sql-imp-swiglib.lua @@ -1,4 +1,4 @@ -if not modules then modules = { } end modules ['util-sql-swiglib'] = { +if not modules then modules = { } end modules ['util-sql-imp-swiglib'] = { version = 1.001, comment = "companion to util-sql.lua", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", @@ -132,31 +132,31 @@ end -- -local typemap = mysql.MYSQL_TYPE_VAR_STRING and { - [mysql.MYSQL_TYPE_VAR_STRING ] = "string", - [mysql.MYSQL_TYPE_STRING ] = "string", - [mysql.MYSQL_TYPE_DECIMAL ] = "number", - [mysql.MYSQL_TYPE_SHORT ] = "number", - [mysql.MYSQL_TYPE_LONG ] = "number", - [mysql.MYSQL_TYPE_FLOAT ] = "number", - [mysql.MYSQL_TYPE_DOUBLE ] = "number", - [mysql.MYSQL_TYPE_LONGLONG ] = "number", - [mysql.MYSQL_TYPE_INT24 ] = "number", - [mysql.MYSQL_TYPE_YEAR ] = "number", - [mysql.MYSQL_TYPE_TINY ] = "number", - [mysql.MYSQL_TYPE_TINY_BLOB ] = "binary", - [mysql.MYSQL_TYPE_MEDIUM_BLOB] = "binary", - [mysql.MYSQL_TYPE_LONG_BLOB ] = "binary", - [mysql.MYSQL_TYPE_BLOB ] = "binary", - [mysql.MYSQL_TYPE_DATE ] = "date", - [mysql.MYSQL_TYPE_NEWDATE ] = "date", - [mysql.MYSQL_TYPE_DATETIME ] = "datetime", - [mysql.MYSQL_TYPE_TIME ] = "time", - [mysql.MYSQL_TYPE_TIMESTAMP ] = "time", - [mysql.MYSQL_TYPE_ENUM ] = "set", - [mysql.MYSQL_TYPE_SET ] = "set", - [mysql.MYSQL_TYPE_NULL ] = "null", -} +-- local typemap = mysql.MYSQL_TYPE_VAR_STRING and { +-- [mysql.MYSQL_TYPE_VAR_STRING ] = "string", +-- [mysql.MYSQL_TYPE_STRING ] = "string", +-- [mysql.MYSQL_TYPE_DECIMAL ] = "number", +-- [mysql.MYSQL_TYPE_SHORT ] = "number", +-- [mysql.MYSQL_TYPE_LONG ] = "number", +-- [mysql.MYSQL_TYPE_FLOAT ] = "number", +-- [mysql.MYSQL_TYPE_DOUBLE ] = "number", +-- [mysql.MYSQL_TYPE_LONGLONG ] = "number", +-- [mysql.MYSQL_TYPE_INT24 ] = "number", +-- [mysql.MYSQL_TYPE_YEAR ] = "number", +-- [mysql.MYSQL_TYPE_TINY ] = "number", +-- [mysql.MYSQL_TYPE_TINY_BLOB ] = "binary", +-- [mysql.MYSQL_TYPE_MEDIUM_BLOB] = "binary", +-- [mysql.MYSQL_TYPE_LONG_BLOB ] = "binary", +-- [mysql.MYSQL_TYPE_BLOB ] = "binary", +-- [mysql.MYSQL_TYPE_DATE ] = "date", +-- [mysql.MYSQL_TYPE_NEWDATE ] = "date", +-- [mysql.MYSQL_TYPE_DATETIME ] = "datetime", +-- [mysql.MYSQL_TYPE_TIME ] = "time", +-- [mysql.MYSQL_TYPE_TIMESTAMP ] = "time", +-- [mysql.MYSQL_TYPE_ENUM ] = "set", +-- [mysql.MYSQL_TYPE_SET ] = "set", +-- [mysql.MYSQL_TYPE_NULL ] = "null", +-- } -- real_escape_string @@ -436,7 +436,7 @@ local function datafetched(specification,query,converter) local q = query[i] local r, m = connection:execute(q) if m then - report_state("error in query, stage: %s",string.collapsespaces(q)) + report_state("error in query, stage: %s",string.collapsespaces(q or "?")) message = message and format("%s\n%s",message,m) or m end if type(r) == "table" then |