How to use the mldb.get function in mldb

To help you get started, we’ve selected a few mldb 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 mldbai / mldb / testing / MLDB-1315-row-table-expressions.js View on Github external
function testQuery(query, expected) {
    mldb.log("testing query", query);

    var resp = mldb.get('/v1/query', {q: query, format: 'table'});

    mldb.log("received", resp.json);
    mldb.log("expected", expected);
    
    unittest.assertEqual(resp.responseCode, 200);
    unittest.assertEqual(resp.json, expected);
}
github mldbai / mldb / testing / MLDB-781-numeric-functions.js View on Github external
function callAndAssert(func, expected, message)
{
    var resp = mldb.get('/v1/query', {q:"SELECT " + func});
    unittest.assertEqual(resp.responseCode, 200, "GET /v1/query failed");
    unittest.assertEqual(resp.json[0].columns[0][1], expected, func + "   " +  message);
}
github mldbai / mldb / testing / MLDB-1486-embedding-types.js View on Github external
function testQuery(query, expected) {
    mldb.log("testing query", query);

    var resp = mldb.get('/v1/query', {q: query, format: 'table'});

    mldb.log("received", resp.json);
    mldb.log("expected", expected);
    
    unittest.assertEqual(resp.responseCode, 200);
    unittest.assertEqual(resp.json, expected);
}
github mldbai / mldb / testing / MLDB-1319-new-executor-function-binding.js View on Github external
function testQuery(query, expected) {
    mldb.log("testing query", query);

    var resp = mldb.get('/v1/query', {q: query, format: 'table'});

    mldb.log("received", resp.json);
    mldb.log("expected", expected);
    
    unittest.assertEqual(resp.responseCode, 200);
    unittest.assertEqual(resp.json, expected);
}
github mldbai / mldb / testing / MLDB-1320-sql-query-whole-table.js View on Github external
function testQuery(query, expected) {
    mldb.log("testing query", query);

    var resp = mldb.get('/v1/query', {q: query, format: 'table'});

    mldb.log("received", resp.json);
    mldb.log("expected", expected);
    
    unittest.assertEqual(resp.responseCode, 200);
    unittest.assertEqual(resp.json, expected);
}

mldb

MarkLogic V6 REST API Driver for Node.js

Unrecognized
Latest version published 11 years ago

Package Health Score

36 / 100
Full package analysis