"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.connect = exports.timestampFromTicks = exports.timestamp = exports.dateFromTicks = exports.date = exports.paramstyle = exports.threadsafety = exports.apilevel = exports.ProgrammingError = exports.OperationalError = exports.IntegrityError = exports.DataError = exports.DatabaseError = exports.InterfaceError = exports.TeradataLogging = exports.TeradataCursor = exports.STRING = exports.NUMBER = exports.DATE = exports.BINARY = exports.TeradataConnection = void 0;
const teradata_connection_1 = require("./teradata-connection");
Object.defineProperty(exports, "TeradataConnection", { enumerable: true, get: function () { return teradata_connection_1.TeradataConnection; } });
var teradata_cursor_1 = require("./teradata-cursor");
Object.defineProperty(exports, "BINARY", { enumerable: true, get: function () { return teradata_cursor_1.BINARY; } });
Object.defineProperty(exports, "DATE", { enumerable: true, get: function () { return teradata_cursor_1.DATE; } });
Object.defineProperty(exports, "NUMBER", { enumerable: true, get: function () { return teradata_cursor_1.NUMBER; } });
Object.defineProperty(exports, "STRING", { enumerable: true, get: function () { return teradata_cursor_1.STRING; } });
Object.defineProperty(exports, "TeradataCursor", { enumerable: true, get: function () { return teradata_cursor_1.TeradataCursor; } });
var teradata_logging_1 = require("./teradata-logging");
Object.defineProperty(exports, "TeradataLogging", { enumerable: true, get: function () { return teradata_logging_1.TeradataLogging; } });
var teradata_exceptions_1 = require("./teradata-exceptions");
Object.defineProperty(exports, "InterfaceError", { enumerable: true, get: function () { return teradata_exceptions_1.InterfaceError; } });
Object.defineProperty(exports, "DatabaseError", { enumerable: true, get: function () { return teradata_exceptions_1.DatabaseError; } });
Object.defineProperty(exports, "DataError", { enumerable: true, get: function () { return teradata_exceptions_1.DataError; } });
Object.defineProperty(exports, "IntegrityError", { enumerable: true, get: function () { return teradata_exceptions_1.IntegrityError; } });
Object.defineProperty(exports, "OperationalError", { enumerable: true, get: function () { return teradata_exceptions_1.OperationalError; } });
Object.defineProperty(exports, "ProgrammingError", { enumerable: true, get: function () { return teradata_exceptions_1.ProgrammingError; } });
exports.apilevel = "2.0";
exports.threadsafety = 2;
exports.paramstyle = "qmark";
function date(year, month, day) {
    const oDate = new Date(Date.UTC(year, month, day, 0, 0, 0));
    return oDate.toISOString().slice(0, 10);
}
exports.date = date;
function dateFromTicks(seconds) {
    const oDate = new Date(seconds * 1000);
    const sDate = oDate.toISOString().slice(0, 10);
    const sTime = oDate.toISOString().slice(11, 23);
    return `${sDate} ${sTime}000`;
}
exports.dateFromTicks = dateFromTicks;
function timestamp(year, month, day, hour, minute, second) {
    return new Date(year, month, day, hour, minute, second);
}
exports.timestamp = timestamp;
function timestampFromTicks(seconds) {
    return new Date(seconds * 1000);
}
exports.timestampFromTicks = timestampFromTicks;
function connect(objConParams = {}, strConParams = "{}") {
    const con = new teradata_connection_1.TeradataConnection();
    con.connect(objConParams, strConParams);
    return con;
}
exports.connect = connect;
//# sourceMappingURL=index.js.map