import NotImplementedException from "../Exception/NotImplementedException";
import SerializableObject from "../SerializableObject";
export default class DatabaseProperty extends SerializableObject {
    constructor() {
        super();
    }
    static fromDatabase(_value) {
        throw new NotImplementedException();
    }
    static toDatabase(_value) {
        throw new NotImplementedException();
    }
    static _fromDatabase(value) {
        return this.fromDatabase(value);
    }
    static _toDatabase(value) {
        // if its a RAW query. Return a raw query.
        if (value && value._type === "raw") {
            return value;
        }
        return this.toDatabase(value);
    }
    static getDatabaseTransformer() {
        return {
            to: (value) => {
                return this._toDatabase(value);
            },
            from: (value) => {
                return this._fromDatabase(value);
            },
        };
    }
    static getSchema() {
        throw new NotImplementedException();
    }
}
//# sourceMappingURL=DatabaseProperty.js.map