aboutsummaryrefslogtreecommitdiffstats
path: root/util/sql.lua
Commit message (Collapse)AuthorAgeFilesLines
* util.sql: Remove tostring call from loggingKim Alvefur2019-07-301-4/+4
| | | | Taken care of by loggingmanager now
* util.sql: Ignore if tables and indices already exist on creation (fixes #1064)Kim Alvefur2019-05-301-0/+6
| | | | | | Tested with SQLite3 3.16.2 and 3.27.2 and Postgres 11. MySQL does not support IF NOT EXISTS for indices so not handled here.
* util.sql: Switch from hacky multi-arg xpcall implementation to util.xpcallKim Alvefur2018-11-111-5/+4
|
* vairious: Add annotation when an empty environment is set [luacheck]Kim Alvefur2018-02-281-0/+1
|
* util: Ignore some Lua 5.1 vs 5.2 compat things [luacheck]Kim Alvefur2017-11-101-1/+1
|
* util: Various minor changes to please [luacheck]Kim Alvefur2017-11-101-33/+10
|
* util.sql: Discard useless substitution count from string.gsub in SQL debug logsKim Alvefur2017-11-081-2/+2
|
* util.sql: Return an error message when a SQL commit fails (LuaDBI doesn't) ↵Kim Alvefur2017-11-071-1/+2
| | | | (Thanks Ge0rG)
* util.sql: Don't log at error level if a transaction failed and was retried okMatthew Wild2017-10-041-4/+13
|
* util.sql: Greedily read all rows so we can close queries early (fixes #391)Matthew Wild2017-08-041-1/+5
|
* util.sql: Produce more SQL-standard-like debug messagesKim Alvefur2017-04-131-1/+8
|
* util.sql: Strip indentation from queries for debug loggingKim Alvefur2017-04-121-0/+1
|
* util.sql: Apply quote transform in engine:execute so it is applied to eg ↵Kim Alvefur2017-04-121-2/+1
| | | | encoding checks in mod_storage_sql (thanks Martin)
* SQL: Use standard quotes for columns and other identifiers, rewrite to grave ↵Kim Alvefur2017-04-101-14/+12
| | | | accents for MySQL only (fixes #885)
* util.sql: remove unused one-letter loop variables [luacheck]Anton Shestakov2016-07-231-2/+2
|
* util.sql: Import type too (fix global access)Kim Alvefur2016-05-221-0/+1
|
* util.sql: Import pcall (fixes #677)Matthew Wild2016-05-221-1/+1
|
* util.sql: Log errors in transaction to error level with traceback but return ↵Kim Alvefur2016-03-251-1/+5
| | | | only error message (fixes #464)
* util.sql: Charset should be innocent until proven guilty (initialize ↵Matthew Wild2016-03-231-1/+1
| | | | charset_ok to true), fixes bug introduced in 187ba2e9c012
* util.sql: Catch errors from LuaDBI connect (Fixes #568)Kim Alvefur2016-03-211-1/+2
|
* util.sql: Remove unused arguments [luacheck]Kim Alvefur2016-03-131-2/+2
|
* util.sql: Don't break out of result retreival loopsKim Alvefur2016-03-131-7/+13
|
* util.sql: Move per-driver (currenly only PostgreSQL) query transform into ↵Kim Alvefur2016-03-131-6/+10
| | | | its own method
* util.sql: Localize unpack() in Lua 5.2 compatible wayKim Alvefur2016-02-221-1/+1
|
* util.sql: Raw query debug logging (needs to be explicitly enabled by a plugin)Kim Alvefur2016-02-211-1/+31
|
* util.sql: Export db2uri (mod_storage_sql2 command uses it) (thanks mike)Kim Alvefur2015-09-021-0/+1
|
* util.sql: Log when transactions beginKim Alvefur2015-08-301-0/+1
|
* util.*: Remove use of module() function, make all module functions local and ↵Kim Alvefur2015-02-211-13/+24
| | | | return them in a table at the end
* util.{interpolation,prosodyctl,sql}: Trim trailing whitespaceKim Alvefur2015-07-171-2/+2
|
* util.sql: Add safety check to ensure our chosen connection charset is ↵Matthew Wild2015-07-081-0/+12
| | | | actually being used (MySQL)
* util.sql: Fix log level of debug messageMatthew Wild2015-07-081-1/+1
|
* util.sql: Log debug message when connecting to databaseMatthew Wild2015-07-081-0/+1
|
* util.sql: Make set_encoding() return failure of SET NAMESMatthew Wild2015-07-081-1/+7
|
* util.sql: Return failure if set_encoding() failsMatthew Wild2015-07-081-1/+4
|
* util.sql: Use appropriate collation for the chosen character set - fixes ↵Matthew Wild2015-07-081-1/+1
| | | | MySQL silently ignoring our SET NAMES command when we use utf8mb4
* util.sql: Create table with same charset as the charset we selected for our ↵Matthew Wild2015-07-081-1/+1
| | | | connection, also use corresponding _bin collation
* util.sql: Allow onconnect callback to fail connection to the DB by returning ↵Matthew Wild2015-07-071-1/+4
| | | | false, err
* util.sql: Call onconnect, provide noop dummy if not setKim Alvefur2015-07-021-0/+4
|
* util.sql: Remove built-in engine caching. This is the wrong layer to do ↵Matthew Wild2015-06-031-8/+3
| | | | this, and unintentionally sharing connections could cause problems (e.g. when interleaving multiple queries and result fetching)
* util.sql: Expose db2uri helper functionMatthew Wild2015-06-031-1/+1
|
* util.sql: Rename some variable to match conventionsMatthew Wild2015-06-031-6/+6
|
* util.sql: Remove unused functions and unused commented codeMatthew Wild2015-05-301-87/+0
|
* mod_storage_sql2, util.sql: Set character encoding on every connectKim Alvefur2014-12-111-0/+1
|
* util.sql: Fix previous commitKim Alvefur2013-11-121-1/+1
|
* util.sql: Get character set info from the correct database.Kim Alvefur2013-11-121-1/+1
|
* util.sql: Rewrite auto increment columns to SERIAL for PostgreSQLKim Alvefur2013-11-111-3/+4
|
* util.sql: Fix to call execute on 'self' rather than 'engine' (thanks eisensheng)Matthew Wild2013-11-101-1/+1
|
* util.sql: Rewrite MEDIUMTEXT to TEXT for drivers other than MySQLKim Alvefur2013-10-301-1/+5
|
* util.sql: Check what encoding SQLite3 usesKim Alvefur2013-10-291-1/+7
|
* util.sql: Find out if MySQL supports utf8mb4 and use thatKim Alvefur2013-10-291-6/+11
|