"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCollection = exports._makeNewID = void 0;
var tslib_1 = require("tslib");
var objectql = require("@steedos/objectql");
function _makeNewID() {
    return objectql.getDataSource('default').adapter._makeNewID();
}
exports._makeNewID = _makeNewID;
function getCollection(name) {
    return tslib_1.__awaiter(this, void 0, void 0, function () {
        var adapter;
        return tslib_1.__generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    adapter = objectql.getDataSource('default').adapter;
                    return [4, adapter.connect()];
                case 1:
                    _a.sent();
                    return [2, adapter.collection(name)];
            }
        });
    });
}
exports.getCollection = getCollection;
//# sourceMappingURL=collection.js.map