How to use the express-cassandra.instance function in express-cassandra

To help you get started, we’ve selected a few express-cassandra 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 mengwangk / myInvestor / myInvestor-web / server / myinvestor.js View on Github external
myinvestor.prototype.getDividendSummaries = function (exchangeName, callback) {
    models.instance.DividendSummary.find({
        g_exchange_name: exchangeName
    }, function (err, dividendSummaries) {
        callback(err, dividendSummaries);
    });
}
github mengwangk / myInvestor / myInvestor-web / server / myinvestor.js View on Github external
myinvestor.prototype.getChosenStocks = function (callback) {
    models.instance.ChosenStock.find({}, function (err, chosenStocks) {
        callback(err, chosenStocks);
    });
}
github Sunbird-Ed / SunbirdEd-portal / src / app / helpers / eCreds / cassandraUtil.js View on Github external
const insertData = (data, cb) => {
    const processId = models.uuid();
    data['id'] = _.toString(processId);
    const batch = new models.instance.bulk_upload_process(data);
    batch.save(err => {
        if (err) {
            cb(err, null);
        } else {
            cb(null, processId);
        }
    });
}
github mengwangk / myInvestor / myInvestor-web / server / myinvestor.js View on Github external
myinvestor.prototype.getStocks = function (exchangeName, callback) {
    models.instance.Stock.find({ exchange_name: exchangeName, $orderby: { '$asc': 'stock_symbol' }, }, function (err, stocks) {
        callback(err, stocks);
    });
}
github mengwangk / myInvestor / myInvestor-web / server / myinvestor.js View on Github external
myinvestor.prototype.getExchanges = function (callback) {
    models.instance.Exchange.find({}, function (err, exchanges) {
        callback(err, exchanges);
    });
}
github mengwangk / myInvestor / myInvestor-web / server / myinvestor.js View on Github external
myinvestor.prototype.getStockHistories = function (exchangeName, stockSymbol, callback) {
    models.instance.StockHistory.find({
        exchange_name: exchangeName,
        stock_symbol: stockSymbol,
        $orderby: { '$desc': ['stock_symbol', 'history_date'] }
    }, function (err, histories) {
        callback(err, histories);
    });
}

express-cassandra

Cassandra Object Models (ORM/ODM/OGM) for NodeJS with support for Apache Cassandra, ScyllaDB, Datastax Enterprise, Elassandra & JanusGraph.

LGPL-3.0
Latest version published 4 months ago

Package Health Score

64 / 100
Full package analysis