Software / code / prosody
Comparison
util/sqlite3.lua @ 12975:d10957394a3c
util: Prefix module imports with prosody namespace
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 17 Mar 2023 16:23:16 +0100 |
| parent | 12872:a20923f7d5fd |
| child | 13145:af251471d5ae |
comparison
equal
deleted
inserted
replaced
| 12974:ba409c67353b | 12975:d10957394a3c |
|---|---|
| 7 local error = error | 7 local error = error |
| 8 local type = type | 8 local type = type |
| 9 local t_concat = table.concat; | 9 local t_concat = table.concat; |
| 10 local t_insert = table.insert; | 10 local t_insert = table.insert; |
| 11 local s_char = string.char; | 11 local s_char = string.char; |
| 12 local log = require "util.logger".init("sql"); | 12 local log = require "prosody.util.logger".init("sql"); |
| 13 | 13 |
| 14 local lsqlite3 = require "lsqlite3"; | 14 local lsqlite3 = require "lsqlite3"; |
| 15 local build_url = require "socket.url".build; | 15 local build_url = require "socket.url".build; |
| 16 local ROW, DONE = lsqlite3.ROW, lsqlite3.DONE; | 16 local ROW, DONE = lsqlite3.ROW, lsqlite3.DONE; |
| 17 | 17 |
| 18 -- from sqlite3.h, no copyright claimed | 18 -- from sqlite3.h, no copyright claimed |
| 19 local sqlite_errors = require"util.error".init("util.sqlite3", { | 19 local sqlite_errors = require"prosody.util.error".init("util.sqlite3", { |
| 20 -- FIXME xmpp error conditions? | 20 -- FIXME xmpp error conditions? |
| 21 [1] = { code = 1; type = "modify"; condition = "ERROR"; text = "Generic error" }; | 21 [1] = { code = 1; type = "modify"; condition = "ERROR"; text = "Generic error" }; |
| 22 [2] = { code = 2; type = "cancel"; condition = "INTERNAL"; text = "Internal logic error in SQLite" }; | 22 [2] = { code = 2; type = "cancel"; condition = "INTERNAL"; text = "Internal logic error in SQLite" }; |
| 23 [3] = { code = 3; type = "auth"; condition = "PERM"; text = "Access permission denied" }; | 23 [3] = { code = 3; type = "auth"; condition = "PERM"; text = "Access permission denied" }; |
| 24 [4] = { code = 4; type = "cancel"; condition = "ABORT"; text = "Callback routine requested an abort" }; | 24 [4] = { code = 4; type = "cancel"; condition = "ABORT"; text = "Callback routine requested an abort" }; |