Comparison

plugins/mod_storage_sql.lua @ 7751:168919a947ed

mod_storage_sql: Use is_stanza() from util.stanza
author Kim Alvefur <zash@zash.se>
date Mon, 28 Nov 2016 07:30:39 +0100
parent 7305:c02e3d8f23fc
child 7752:56abe6a8e761
comparison
equal deleted inserted replaced
7750:e58524240b30 7751:168919a947ed
5 local sql = require "util.sql"; 5 local sql = require "util.sql";
6 local xml_parse = require "util.xml".parse; 6 local xml_parse = require "util.xml".parse;
7 local uuid = require "util.uuid"; 7 local uuid = require "util.uuid";
8 local resolve_relative_path = require "util.paths".resolve_relative_path; 8 local resolve_relative_path = require "util.paths".resolve_relative_path;
9 9
10 local stanza_mt = require"util.stanza".stanza_mt; 10 local is_stanza = require"util.stanza".is_stanza;
11 local getmetatable = getmetatable;
12 local t_concat = table.concat; 11 local t_concat = table.concat;
13 local function is_stanza(x) return getmetatable(x) == stanza_mt; end
14 12
15 local noop = function() end 13 local noop = function() end
16 local unpack = unpack 14 local unpack = unpack
17 local function iterator(result) 15 local function iterator(result)
18 return function(result_) 16 return function(result_)