_id
stringlengths
2
6
title
stringlengths
0
58
partition
stringclasses
3 values
text
stringlengths
52
373k
language
stringclasses
1 value
meta_information
dict
q54600
insertInTrie
train
function insertInTrie({ parts, isIcann }, trie) { let node = trie; for (let i = 0; i < parts.length; i += 1) { const part = parts[i]; let nextNode = node[part]; if (nextNode === undefined) { nextNode = {}; node[part] = nextNode; } node = nextNode; } node.$ = isIcann ? 1 : 2; ...
javascript
{ "resource": "" }
q54601
getXPosAdjustedForKink
train
function getXPosAdjustedForKink(pos) { var first = clinicalTimelineUtil.getLowerBoundIndex(ticksToShow, pos); var second = first + 1; if (second > ticksToShow.length - 1) { return tickCoordinatesKink[first]; } return tickCoordinatesKink[first] + (pos - ticksToShow[first]) * (tickCoordinate...
javascript
{ "resource": "" }
q54602
clickHandlerKink
train
function clickHandlerKink() { timeline.pluginSetOrGetState("trimClinicalTimeline", false); //create a bounding box to ease the clicking of axis xAxisBBox = d3.select(timeline.divId()+" > svg > g > g.axis")[0][0].getBBox() d3.select(timeline.divId()+"> svg > g") .insert("rect") .attr("x", xAx...
javascript
{ "resource": "" }
q54603
lookup
train
function lookup(latitude, longitude, countryCode) { let minDistance = Infinity let city = {} // start with inout values const start = { latitude, longitude } // iterate through all locations try { const otherCountryOrigin = require(`../locations/${countryCode}.json`) otherCountryOrigin.forEach((lo...
javascript
{ "resource": "" }
q54604
train
function () { $("#addtrack").css("visibility","hidden"); var element = document.getElementsByTagName('path')[0]; element.setAttribute("stroke" , "black"); element.setAttribute("fill" , "none"); element = document.getElementsByTagName('line'); for( var i=0 ; i<element.length ; i++) ...
javascript
{ "resource": "" }
q54605
train
function(download) { $("#addtrack").css("visibility","hidden"); var element = document.getElementsByTagName('path')[0]; element.setAttribute("stroke" , "black"); element.setAttribute("fill" , "none"); element = document.getElementsByTagName('line'); for( var i=0 ; i<element.length ;...
javascript
{ "resource": "" }
q54606
train
function() { //to generate a PDF we first need to generate the canvas as done in generatePNG //just don't need to download the PNG this.generatePNG(false); setTimeout(function(){ html2canvas($("#canvas"), { onrendered: function(canvas) { var canvas = documen...
javascript
{ "resource": "" }
q54607
zoomExplanation
train
function zoomExplanation(divId, svg, text, visibility, pos) { d3.select(divId + " svg") .insert("text") .attr("transform", "translate("+(parseInt(svg.attr("width"))-pos)+", "+parseInt(svg.attr("height")-5)+")") .attr("class", "timeline-label") .text("") .attr("id", "timelineZoomExplana...
javascript
{ "resource": "" }
q54608
train
function (pluginId, bool) { timeline.plugins().forEach(function (element) { if (pluginId === element.obj.id) { element.enabled = bool; } }); timeline(); }
javascript
{ "resource": "" }
q54609
init
train
function init( element, value, bindings ) { var $el = $( element ); var model = value(); var allBindings = unwrap( bindings() ); var options = ko.toJS( allBindings.froalaOptions ); // initialize the editor $el.froalaEditor( options || {} ); // provide froala editor instance for flexibility...
javascript
{ "resource": "" }
q54610
train
function (e, editor) { if (ko.isWriteableObservable(model)) { var editorValue = editor.html.get(); var current = model(); if (current !== editorValue) { model(editorValue); } } }
javascript
{ "resource": "" }
q54611
update
train
function update( element, value ) { var $el = $( element ); var modelValue = unwrap( value() ); var editorInstance = $el.data( 'froala.editor' ); if( editorInstance == null ) { return; } var editorValue = editorInstance.html.get(); // avoid any un-necessary updates if( editorVal...
javascript
{ "resource": "" }
q54612
lazyDo
train
function lazyDo(fn, timeOut, doName, obj) { var sto = null; if (!obj) { obj = window; } if (timeOut == null) { timeOut = 25; } //If before the implementation of the operation has not exceeded the time,then make it cancel. if (doName && obj[doName]) { clearTimeout(obj[doName]); } //Delay...
javascript
{ "resource": "" }
q54613
pollDo
train
function pollDo(fn, timeOut, doName, obj) { var siv = null; if (!obj) { obj = window; } if (timeOut == null) { timeOut = 100; } //If the previous poll operation is exist,then make it cancel. if (doName && obj[doName]) { clearInterval(obj[doName]); } //Polling execution operations every ...
javascript
{ "resource": "" }
q54614
on
train
function on(name, fn, elem) { var useCapture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; return (elem || doc).addEventListener(name, fn, useCapture); }
javascript
{ "resource": "" }
q54615
off
train
function off(name, fn, elem) { var useCapture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; return (elem || doc).removeEventListener(name, fn, useCapture); }
javascript
{ "resource": "" }
q54616
pageWidth
train
function pageWidth() { return win.innerWidth != null ? win.innerWidth : doc.documentElement && doc.documentElement.clientWidth != null ? doc.documentElement.clientWidth : doc.body != null ? doc.body.clientWidth : null; }
javascript
{ "resource": "" }
q54617
pageHeight
train
function pageHeight() { return win.innerHeight != null ? win.innerHeight : doc.documentElement && doc.documentElement.clientHeight != null ? doc.documentElement.clientHeight : doc.body != null ? doc.body.clientHeight : null; }
javascript
{ "resource": "" }
q54618
clone
train
function clone(item) { if (!foundFirst && selectedKeys.indexOf(item.key) !== -1 || !foundFirst && !selectedKeys.length && firstActiveValue.indexOf(item.key) !== -1) { foundFirst = true; return Object(__WEBPACK_IMPORTED_MODULE_4_react__["cloneElement"])(item, { ref: functi...
javascript
{ "resource": "" }
q54619
matches
train
function matches(elem, selector) { // Vendor-specific implementations of `Element.prototype.matches()`. var proto = window.Element.prototype; var nativeMatches = proto.matches || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector; ...
javascript
{ "resource": "" }
q54620
insert
train
function insert(target, host, fn) { var i = 0, self = host || this, r = [] // target nodes could be a css selector if it's a string and a selector engine is present // otherwise, just use target , nodes = query && typeof target == 'string' && target.charAt(0) != '<' ? query(target) : targe...
javascript
{ "resource": "" }
q54621
each
train
function each(a, fn) { var i = 0, l = a.length for (; i < l; i++) fn.call(null, a[i]) }
javascript
{ "resource": "" }
q54622
_qwery
train
function _qwery(selector, _root) { var r = [], ret = [], i, l, m, token, tag, els, intr, item, root = _root , tokens = tokenCache.g(selector) || tokenCache.s(selector, selector.split(tokenizr)) , dividedTokens = selector.match(dividers) if (!tokens.length) return r token = (token...
javascript
{ "resource": "" }
q54623
crawl
train
function crawl(e, i, p) { while (p = walker[dividedTokens[i]](p, e)) { if (isNode(p) && (interpret.apply(p, q(tokens[i])))) { if (i) { if (cand = crawl(p, i - 1, p)) return cand } else return p } } }
javascript
{ "resource": "" }
q54624
train
function (checkNamespaces) { var i, j if (!checkNamespaces) return true if (!this.namespaces) return false for (i = checkNamespaces.length; i--;) { for (j = this.namespaces.length; j--;) { ...
javascript
{ "resource": "" }
q54625
train
function () { var i, entries = registry.entries() for (i in entries) { if (entries[i].type && entries[i].type !== 'unload') remove(entries[i].element, entries[i].type) } win[detachEvent]('onunload', cleanup) win.CollectGarbage && win.CollectGarbage() }
javascript
{ "resource": "" }
q54626
train
function (name, table, condition, opts) { opts = opts || {}; if (name) { name = sql.stringToIdentifier(name); if (table && condition) { opts = comb.merge({joinType: "left", table: table, condition: condition, column: name}, opts); ...
javascript
{ "resource": "" }
q54627
train
function () { if (!this.__serverVersion) { var self = this; this.__serverVersion = this.get(identifier("version").sqlFunction).chain(function (version) { var m = version.match(/PostgreSQL (\d+)\.(\d+)(?:(?:rc\d+)|\.(\d+))?/); version = ...
javascript
{ "resource": "" }
q54628
train
function (type, opts, cb) { var ret; var ds = this.metadataDataset.from("pg_class") .filter({relkind: type}).select("relname") .exclude({relname: {like: this.SYSTEM_TABLE_REGEXP}}) .join("pg_namespace", {oid: identifier("relnamespace")}); ...
javascript
{ "resource": "" }
q54629
train
function (column) { if (column.fixed) { return ["char(", column.size || 255, ")"].join(""); } else if (column.text === false || column.size) { return ["varchar(", column.size || 255, ")"].join(""); } else { return 'text'; } ...
javascript
{ "resource": "" }
q54630
train
function (parent) { var options = this.__opts || {}; var ds, self = this; if (!isUndefined((ds = options.dataset)) && isFunction(ds)) { ds = ds.apply(parent, [parent]); } if (!ds) { var q = {}; this._setAssociati...
javascript
{ "resource": "" }
q54631
train
function (model) { //if we have them return them; if (this.associationLoaded(model)) { var assoc = this.getAssociation(model); return this.isEager() ? assoc : when(assoc); } else if (model.isNew) { return null; } else { ...
javascript
{ "resource": "" }
q54632
train
function (parent, name) { this.name = name; var self = this; this.parent = parent; var parentProto = parent.prototype; parentProto["__defineGetter__"](name, function () { return self._getter(this); }); parentProto["__def...
javascript
{ "resource": "" }
q54633
train
function () { var q = this._getPrimaryKeyQuery(); return new PromiseList(this._static.__ctiTables.slice().reverse().map(function (table) { return this.db.from(table).filter(q).remove(); }, this), true).promise(); }
javascript
{ "resource": "" }
q54634
train
function () { var Self = this._static, ret; if (Self === Self.__ctiBaseModel) { ret = this._super(arguments); } else { var pk = this.primaryKey[0], tables = Self.__ctiTables, ctiColumns = Self.__ctiColumns, self = this, isRestricted...
javascript
{ "resource": "" }
q54635
train
function () { var q = this._getPrimaryKeyQuery(), changed = this.__changed; var modelStatic = this._static, ctiColumns = modelStatic.__ctiColumns, tables = modelStatic.__ctiTables, self = this; return new PromiseList(tables.map(function...
javascript
{ "resource": "" }
q54636
train
function (tableAlias) { tableAlias = this._toTableName(tableAlias); var usedAliases = [], from, join; if ((from = this.__opts.from) != null) { usedAliases = usedAliases.concat(from.map(function (n) { return this._toTableName(n); }, ...
javascript
{ "resource": "" }
q54637
train
function (v) { if (isInstanceOf(v, Json, JsonArray)) { return this._literalJson(v); } else if (isInstanceOf(v, LiteralString)) { return "" + v; } else if (isString(v)) { return this._literalString(v); } else if (isNumber(v))...
javascript
{ "resource": "" }
q54638
train
function (name) { var ret; if (isString(name)) { var parts = this._splitString(name); var schema = parts[0], table = parts[1], alias = parts[2]; ret = (schema || alias) ? alias || table : table; } else if (isInstanceOf(name, Identifier)...
javascript
{ "resource": "" }
q54639
train
function (type) { var sql = [("" + type).toUpperCase()]; try { this._static[sql + "_CLAUSE_METHODS"].forEach(function (m) { if (m.match("With")) { this[m](sql); } else { var sqlRet = this[m]()...
javascript
{ "resource": "" }
q54640
train
function (sql) { var columns = this.__opts.columns, ret = ""; if (columns && columns.length) { ret = " (" + columns.map( function (c) { return c.toString(this); }, this).join(this._static.COMMA_SEPARATOR) + ")"; ...
javascript
{ "resource": "" }
q54641
train
function () { var values = this.__opts.values, ret = []; if (isArray(values)) { ret.push(values.length === 0 ? " DEFAULT VALUES" : " VALUES " + this.literal(values)); } else if (isInstanceOf(values, Dataset)) { ret.push(" " + this._subselectSql(values)...
javascript
{ "resource": "" }
q54642
train
function (source) { if (!Array.isArray(source)) { source = [source]; } if (!source || !source.length) { throw new QueryError("No source specified for the query"); } return " " + source.map( function (s) { ...
javascript
{ "resource": "" }
q54643
train
function (db) { //create a table called state; return db .createTable("state", function () { this.primaryKey("id"); this.name(String); this.population("integer"); this.founded(Date); this.climate(String); ...
javascript
{ "resource": "" }
q54644
train
function (db, directory, opts) { this.db = db; this.directory = directory; opts = opts || {}; this.table = opts.table || this._static.DEFAULT_SCHEMA_TABLE; this.column = opts.column || this._static.DEFAULT_SCHEMA_COLUMN; this._opts = opts; ...
javascript
{ "resource": "" }
q54645
train
function () { if (!this.__schemaDataset) { var ds = this.db.from(this.table), self = this; return this.__createTable().chain(function () { return (self.__schemaDataset = ds); }); } else { return when(this.__schem...
javascript
{ "resource": "" }
q54646
train
function (obj) { return isHash(obj) || (isArray(obj) && obj.length && obj.every(function (i) { return isArray(i) && i.length === 2; })); }
javascript
{ "resource": "" }
q54647
train
function (ds) { !Dataset && (Dataset = require("./dataset")); ds = ds || new Dataset(); return ds.castSql(this.expr, this.type); }
javascript
{ "resource": "" }
q54648
train
function (ds) { !Dataset && (Dataset = require("./dataset")); ds = ds || new Dataset(); return ds.complexExpressionSql(this.op, this.args); }
javascript
{ "resource": "" }
q54649
train
function (args) { args = argsToArray(arguments); if (args.length && !this.supportsDistinctOn) { throw new QueryError("DISTICT ON is not supported"); } args = args.map(function (a) { return isString(a) ? new Identifier(a) : a; })...
javascript
{ "resource": "" }
q54650
train
function(includeDatasets, fromModel) { var ds = this.mergeOptions({}), originalRowCb = ds.rowCb; if(!ds.__opts._eagerAssoc) { ds.__opts._eagerAssoc = includeDatasets; ds.rowCb = function (topLevelResults) { function toObject(t...
javascript
{ "resource": "" }
q54651
train
function (args, cb) { args = [this.__opts["having"] ? "having" : "where"].concat(argsToArray(arguments)); return this._filter.apply(this, args); }
javascript
{ "resource": "" }
q54652
train
function (opts) { opts = isUndefined(opts) ? {} : opts; var fs = {}; var nonSqlOptions = this._static.NON_SQL_OPTIONS; Object.keys(this.__opts).forEach(function (k) { if (nonSqlOptions.indexOf(k) === -1) { fs[k] = null; ...
javascript
{ "resource": "" }
q54653
train
function (columns) { columns = argsToArray(arguments); var group = this.group.apply(this, columns.map(function (c) { return this._unaliasedIdentifier(c); }, this)); return group.select.apply(group, columns.concat([this._static.COUNT_OF_ALL_AS_COUNT])); ...
javascript
{ "resource": "" }
q54654
train
function (dataset, opts) { opts = isUndefined(opts) ? {} : opts; if (!isHash(opts)) { opts = {all: opts}; } if (!this.supportsIntersectExcept) { throw new QueryError("INTERSECT not supported"); } else if (opts.all && !this.suppo...
javascript
{ "resource": "" }
q54655
train
function () { var having = this.__opts.having, where = this.__opts.where; if (!(having || where)) { throw new QueryError("No current filter"); } var o = {}; if (having) { o.having = BooleanExpression.invert(having); ...
javascript
{ "resource": "" }
q54656
train
function (limit, offset) { if (this.__opts.sql) { return this.fromSelf().limit(limit, offset); } if (Array.isArray(limit) && limit.length === 2) { offset = limit[0]; limit = limit[1] - limit[0] + 1; } if (isStrin...
javascript
{ "resource": "" }
q54657
train
function (table) { var o = this.__opts; if (o.sql) { return this.mergeOptions(); } var h = {}; array.intersect(Object.keys(o), this._static.QUALIFY_KEYS).forEach(function (k) { h[k] = this._qualifiedExpression(o[k], table); ...
javascript
{ "resource": "" }
q54658
train
function (args) { args = argsToArray(arguments); return this.order.apply(this, this._invertOrder(args.length ? args : this.__opts.order)); }
javascript
{ "resource": "" }
q54659
train
function (cols) { var ret; if (!this.hasSelectSource) { ret = this.select.apply(this, arguments); } else { ret = this.mergeOptions(); } return ret; }
javascript
{ "resource": "" }
q54660
train
function (cols) { cols = argsToArray(arguments); var currentSelect = this.__opts.select; return this.select.apply(this, (currentSelect || []).concat(cols)); }
javascript
{ "resource": "" }
q54661
train
function (type, dataset, options) { var ds = this._compoundFromSelf().mergeOptions({compounds: (array.toArray(this.__opts.compounds || [])).concat([ [type, dataset._compoundFromSelf(), options.all] ])}); return options.fromSelf === false ? ds : ds.fromSelf(options); ...
javascript
{ "resource": "" }
q54662
train
function (op, obj) { var pairs = []; if (Expression.isConditionSpecifier(obj)) { if (isHash(obj)) { obj = array.toArray(obj); } obj.forEach(function (pair) { pairs.push(new BooleanExpression(op, new Identifie...
javascript
{ "resource": "" }
q54663
train
function (name, type, opts) { opts = opts || {}; this.columns.push(merge({name:name, type:type}, opts)); if (opts.index) { this.index(name); } }
javascript
{ "resource": "" }
q54664
train
function (name) { if (Array.isArray(name)) { return this.__compositePrimaryKey.apply(this, arguments); } else { var args = argsToArray(arguments, 1), type; var opts = args.pop(); this.__primaryKey = merge({}, this.db.serialPrimaryKe...
javascript
{ "resource": "" }
q54665
train
function (name, newName, opts) { opts = opts || {}; this.operations.push(merge({op:"renameColumn", name:name, newName:newName}, opts)); }
javascript
{ "resource": "" }
q54666
train
function (name, type, opts) { opts = opts || {}; this.operations.push(merge({op:"setColumnType", name:name, type:type}, opts)); }
javascript
{ "resource": "" }
q54667
train
function () { if (!this.__isNew) { var self = this; return this.dataset.naked().filter(this._getPrimaryKeyQuery()).one().chain(function (values) { self.__setFromDb(values, true); return self; }); } else { ...
javascript
{ "resource": "" }
q54668
train
function (vals, /*?object*/query, options) { options = options || {}; var dataset = this.dataset; return this._checkTransaction(options, function () { if (!isUndefined(query)) { dataset = dataset.filter(query); } ret...
javascript
{ "resource": "" }
q54669
train
function (id, options) { var self = this; return this._checkTransaction(options, function () { return self.findById(id).chain(function (model) { return model ? model.remove(options) : null; }); }); }
javascript
{ "resource": "" }
q54670
train
function (items, options) { options = options || {}; var isArr = isArray(items), Self = this; return this._checkTransaction(options, function () { return asyncArray(items) .map(function (o) { if (!isInstanceOf(o, Self)) { ...
javascript
{ "resource": "" }
q54671
train
function (dt, format) { var ret = ""; if (isInstanceOf(dt, SQL.Time)) { ret = this.timeToString(dt, format); } else if (isInstanceOf(dt, SQL.Year)) { ret = this.yearToString(dt, format); } else if (isInstanceOf(dt, SQL.DateTime)) { ...
javascript
{ "resource": "" }
q54672
train
function (dt, format) { var ret; if (this.convertTwoDigitYears) { ret = date.parse(dt, this.TWO_YEAR_DATE_FORMAT); } if (!ret) { ret = date.parse(dt, format || this.dateFormat); } if (!ret) { throw ne...
javascript
{ "resource": "" }
q54673
train
function (args) { args = argsToArray(arguments); return !args.length ? this._super(arguments) : this.group.apply(this, args); }
javascript
{ "resource": "" }
q54674
train
function (cols, terms, opts) { opts = opts || {}; cols = toArray(cols).map(this.stringToIdentifier, this); return this.filter(sql.literal(this.fullTextSql(cols, terms, opts))); }
javascript
{ "resource": "" }
q54675
train
function (cols, term, opts) { opts = opts || {}; return format("MATCH %s AGAINST (%s%s)", this.literal(toArray(cols)), this.literal(toArray(term).join(" ")), opts.boolean ? " IN BOOLEAN MODE" : ""); }
javascript
{ "resource": "" }
q54676
train
function (columns, values) { return [this.insertSql(columns, sql.literal('VALUES ' + values.map( function (r) { return this.literal(toArray(r)); }, this).join(this._static.COMMA_SEPARATOR)))]; }
javascript
{ "resource": "" }
q54677
train
function (sql) { if (this._joinedDataset) { return format(" %s FROM %s%s", this._sourceList(this.__opts.from[0]), this._sourceList(this.__opts.from), this._selectJoinSql()); } else { return this._super(arguments); } }
javascript
{ "resource": "" }
q54678
train
function (sql) { var values = this.__opts.values; if (isArray(values) && !values.length) { return " ()"; } else { return this._super(arguments); } }
javascript
{ "resource": "" }
q54679
train
function () { var ret = ""; var updateCols = this.__opts.onDuplicateKeyUpdate; if (updateCols) { var updateVals = null, l, last; if ((l = updateCols.length) > 0 && isHash((last = updateCols[l - 1]))) { updateVals = last; ...
javascript
{ "resource": "" }
q54680
train
function (type) { var ret = null, meth; if (isString(type)) { ret = this._static.CAST_TYPES[type] || this._super(arguments); } else if (type === String) { meth += "CHAR"; } else if (type === Number) { meth += "DECIMAL"; ...
javascript
{ "resource": "" }
q54681
train
function (table, opts) { var indexes = {}; var removeIndexes = []; var m = this.outputIdentifierFunc; var im = this.inputIdentifierFunc; return this.metadataDataset.withSql("SHOW INDEX FROM ?", isInstanceOf(table, sql.Identifier) ? table : sql.identifier(im(ta...
javascript
{ "resource": "" }
q54682
train
function () { var ret; if (!this.__serverVersion) { var self = this; ret = this.get(sql.version().sqlFunction).chain(function (version) { var m = version.match(/(\d+)\.(\d+)\.(\d+)/); return (self._serverVersion = (parseInt(...
javascript
{ "resource": "" }
q54683
train
function (opts) { var m = this.outputIdentifierFunc; return this.metadataDataset.withSql('SHOW TABLES').map(function (r) { return m(r[Object.keys(r)[0]]); }); }
javascript
{ "resource": "" }
q54684
train
function (table, op) { var ret = new Promise(), self = this; if (op.op === "addColumn") { var related = op.table; if (related) { delete op.table; ret = this._super(arguments).chain(function (sql) { op...
javascript
{ "resource": "" }
q54685
train
function (conn, opts) { var self = this; return this.__setTransactionIsolation(conn, opts).chain(function () { return self.__logConnectionExecute(conn, self.beginTransactionSql); }); }
javascript
{ "resource": "" }
q54686
train
function (column) { if (isString(column.type) && column.type.match(/string/i) && column.text) { delete column["default"]; } return this._super(arguments, [column]); }
javascript
{ "resource": "" }
q54687
train
function (conn, opts) { opts = opts || {}; var s = opts.prepare, self = this; if (s) { return this.__logConnectionExecute(conn, comb("XA END %s").format(this.literal(s))).chain(function () { return self.__logConnectionExecute(comb("XA PREPARE %s")....
javascript
{ "resource": "" }
q54688
train
function (name, generator, options) { options = options || {}; var engine = options.engine, charset = options.charset, collate = options.collate; if (isUndefined(engine)) { engine = this._static.defaultEngine; } if (isUndefined(charset)) { ...
javascript
{ "resource": "" }
q54689
train
function (tableName, index) { var indexName = this.__quoteIdentifier(index.name || this.__defaultIndexName(tableName, index.columns)), t = index.type, using = ""; var indexType = ""; if (t === "fullText") { indexType = "FULLTEXT "; } else i...
javascript
{ "resource": "" }
q54690
train
function (conn, opts) { opts = opts || {}; var s = opts.prepare; var logConnectionExecute = comb("__logConnectionExecute"); if (s) { s = this.literal(s); var self = this; return this.__logConnectionExecute(conn, "XA END " + ...
javascript
{ "resource": "" }
q54691
train
function (tableName, opts) { var m = this.outputIdentifierFunc, im = this.inputIdentifierFunc, self = this; return this.metadataDataset.withSql("DESCRIBE ?", sql.identifier(im(tableName))).map(function (row) { var ret = {}; var e = row[m("Extra")]; ...
javascript
{ "resource": "" }
q54692
train
function (block, cb) { var self = this; var ret = asyncArray(this.forEach().chain(function (records) { return self.postLoad(records); })); if (block) { ret = ret.forEach(block); } return ret.classic(cb).promise(); ...
javascript
{ "resource": "" }
q54693
train
function (cb) { return this.__aggregateDataset().get(sql.COUNT(sql.literal("*")).as("count")).chain(function (res) { return parseInt(res, 10); }).classic(cb); }
javascript
{ "resource": "" }
q54694
train
function (block, cb) { var rowCb, ret; if (this.__opts.graph) { ret = this.graphEach(block); } else { ret = this.fetchRows(this.selectSql); if ((rowCb = this.rowCb)) { ret = ret.map(function (r) { ...
javascript
{ "resource": "" }
q54695
train
function (args) { args = comb(arguments).toArray(); var cb, block = isFunction(args[args.length - 1]) ? args.pop() : null; if (block && block.length > 0) { cb = block; block = isFunction(args[args.length - 1]) ? args.pop() : null; ...
javascript
{ "resource": "" }
q54696
train
function (columns, values, opts, cb) { if (isFunction(opts)) { cb = opts; opts = null; } opts = opts || {}; var ret, self = this; if (isInstanceOf(values, Dataset)) { ret = this.db.transaction(function () { ...
javascript
{ "resource": "" }
q54697
train
function () { var args = argsToArray(arguments); var cb = isFunction(args[args.length - 1]) ? args.pop() : null; return this.executeInsert(this.insertSql.apply(this, args)).classic(cb); }
javascript
{ "resource": "" }
q54698
train
function (column, cb) { return this.__aggregateDataset().get(sql.max(column).minus(sql.min(column)), cb); }
javascript
{ "resource": "" }
q54699
train
function (args) { if (!this.__opts.order) { throw new QueryError("No order specified"); } var ds = this.reverse(); return ds.first.apply(ds, arguments); }
javascript
{ "resource": "" }