"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function nullFromDb(value) {
    if (value.NULL) {
        return null;
    }
    else {
        throw new Error(`there is no NULL value defined on given attribute value ${value}`);
    }
}
function nullToDb(value) {
    if (value !== null) {
        throw new Error(`null mapper only supports null value, got ${value}`);
    }
    return { NULL: true };
}
exports.NullMapper = {
    fromDb: nullFromDb,
    toDb: nullToDb,
};
//# sourceMappingURL=null.mapper.js.map