UNPKG

@grandlinex/bundle-sqlight

Version:

> SQLight support GrandlineX using better-sqlite3

24 lines (23 loc) 555 B
export default function resolveDBType(dType) { switch (dType) { case 'int': return 'INTEGER'; case 'double': case 'float': return 'REAL'; case 'blob': return 'BLOB'; case 'string': case 'uuid': case 'text': return 'TEXT'; case 'boolean': return 'INTEGER'; case 'date': return 'TIMESTAMP'; case 'json': return 'TEXT'; default: throw Error('TypeNotSupported'); } }