UNPKG

sn-sms

Version:

A simple CLI tool for work with sms in standart-n automation

10 lines (8 loc) 631 B
// Generated by CoffeeScript 1.6.2 exports.insertMessageIntoBase = function(data, cn) { var fields, sanitize, table; sanitize = global.controls.lib.validator.sanitize(); table = cn.tables.messages.name; fields = cn.tables.messages.fields; return 'insert into ' + table + ' ' + '("' + fields.index + '","' + fields.sim + '","' + fields.phone + '","' + fields.date + '","' + fields.text + '") values ' + '(\'' + sanitize(data.id).toInt() + '\',\'' + sanitize(data.sim).toInt() + '\',\'' + sanitize(data.phone).escape() + '\',\'' + sanitize(data.date.datetime).escape() + '\',\'' + sanitize(data.text).escape() + '\')'; };