UNPKG

@a2lix/schemql

Version:

A lightweight TypeScript library that enhances your SQL workflow by combining raw SQL with targeted type safety and schema validation

2 lines (1 loc) 690 B
"use strict";var S=Object.defineProperty;var t=(s,N)=>S(s,"name",{value:N,configurable:!0});var R=(s=>(s.InvalidParams="INVALID_PARAMS",s.InvalidResults="INVALID_RESULTS",s.UniqueConstraint="UNIQUE_CONSTRAINT",s.ForeignkeyConstraint="FOREIGNKEY_CONSTRAINT",s.NotnullConstraint="NOTNULL_CONSTRAINT",s.CheckConstraint="CHECK_CONSTRAINT",s.PrimarykeyConstraint="PRIMARYKEY_CONSTRAINT",s.NoResult="NO_RESULT",s.Generic="GENERIC",s))(R||{});const i=class i extends Error{constructor(N,I,T){super(N),this.code=I,this.originalError=T,this.isNoResultError=()=>this.code==="NO_RESULT",this.name="AdapterError"}};t(i,"BaseAdapterError");let n=i;exports.AdapterErrorCode=R,exports.BaseAdapterError=n;