export class NullMapper {
    constructor() { }
    fromDb(value) {
        if (value.NULL) {
            return null;
        }
        else {
            throw new Error(`there is no NULL value defiend on given attribute value ${value}`);
        }
    }
    toDb(value) {
        if (value !== null) {
            throw new Error(`null mapper only supports null value, got ${value}`);
        }
        return { NULL: true };
    }
}
//# sourceMappingURL=null.mapper.js.map