UNPKG

@grandlinex/bundle-sqlight

Version:

> SQLight support GrandlineX using better-sqlite3

26 lines (25 loc) 605 B
export default function resolveDBType(dType) { switch (dType) { case 'int': return 'INTEGER'; case 'long': return 'BIGINT'; 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'); } }