How to use the sql-client/lib/sql-client.SQLClient function in sql-client

To help you get started, we’ve selected a few sql-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ioBroker / ioBroker.sql / lib / mssql-client.js View on Github external
(function() {
    let ConnectionFactory = require('sql-client/lib/connection-factory').ConnectionFactory;
    let SQLClient = require('sql-client/lib/sql-client').SQLClient;
    let SQLClientPool = require('sql-client/lib/sql-client-pool').SQLClientPool;
    let mssql = require('mssql');

    let bind = function (fn, me){ return function (){ return fn.apply(me, arguments); }; };
    let extend = function (child, parent) { for (const key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
    let hasProp = {}.hasOwnProperty;
    let slice = [].slice;

    let MSSQLConnectionFactory = (function(superClass) {
        extend(MSSQLConnectionFactory, superClass);

        function MSSQLConnectionFactory() {
            this.execute = bind(this.execute, this);
            this.open_connection = bind(this.open_connection, this);
            return MSSQLConnectionFactory.__super__.constructor.apply(this, arguments);
        }
github ioBroker / ioBroker.sql / lib / postgresql-client.js View on Github external
(function() {
  var ConnectionFactory,  PostgreSQLClient, PostgreSQLClient2, PostgreSQLClientPool, PostgreSQLClientPool2, PostgreSQLConnectionFactory, PostgreSQLConnectionFactory2, SQLClient, SQLClientPool, pg,
    bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty,
    slice = [].slice;

  SQLClient = require('sql-client/lib/sql-client').SQLClient;

  SQLClientPool = require('sql-client/lib/sql-client-pool').SQLClientPool;

  ConnectionFactory = require('sql-client/lib/connection-factory').ConnectionFactory;

  pg = require('pg');
    try {
        if ((pg != null ? pg["native"] : void 0) != null) {
            pg = pg["native"];
        }
    } catch(err) {

    }


  PostgreSQLConnectionFactory = (function(superClass) {

sql-client

A dirt-simple SQL client abstraction (currently) supporting PostgreSQL, MySQL and SQLite.

MIT
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis