lines-db 0.0.0-stage → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,555 @@
1
- # Temporary Holding Version
1
+ # lines-db
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [日本語](./README.ja.md)
4
+
5
+ lines-db loads JSONL files into SQLite tables and writes changes back to their source files. Use it for seed data and test fixtures that you keep in files.
6
+
7
+ Columns are inferred from the rows. Define a schema with a Standard Schema library such as Valibot or Zod to validate rows and generate TypeScript types. Objects and arrays are stored as JSON columns. Schemas can transform values on load and convert them back when saving.
8
+
9
+ The CLI validates, migrates, fills missing values, and generates types. Install `@lines-db/studio` to edit data in a browser, or use the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=toiroakr.lines-db-vscode) for validation in the editor.
10
+
11
+ ## Installation
12
+
13
+ Requires Node.js 22.12.0 or later.
14
+
15
+ ```bash
16
+ npm install lines-db
17
+ ```
18
+
19
+ With pnpm, use `pnpm add lines-db`.
20
+
21
+ ## CLI usage
22
+
23
+ ### Define schemas
24
+
25
+ Place a schema file next to the JSONL file, using the same table name.
26
+
27
+ ```
28
+ data/
29
+ ├── users.jsonl
30
+ ├── users.schema.ts
31
+ ├── products.jsonl
32
+ └── products.schema.ts
33
+ ```
34
+
35
+ The following `users.schema.ts` uses Valibot. Add it with `npm install valibot`.
36
+
37
+ ```typescript
38
+ import * as v from 'valibot';
39
+ import { defineSchema } from 'lines-db';
40
+
41
+ export const schema = defineSchema(
42
+ v.object({
43
+ id: v.pipe(v.number(), v.integer(), v.minValue(1)),
44
+ name: v.pipe(v.string(), v.minLength(1)),
45
+ age: v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(150)),
46
+ email: v.pipe(v.string(), v.email()),
47
+ }),
48
+ );
49
+ export default schema;
50
+ ```
51
+
52
+ Any library implementing [Standard Schema](https://standardschema.dev/) can be used.
53
+
54
+ `initialize()` fails if a schema file cannot be imported or does not export a Standard Schema as `schema` or `default`. The error includes the file and the reason.
55
+
56
+ ### Validate JSONL files
57
+
58
+ Validate a file, or all JSONL files in a directory, against their schemas.
59
+
60
+ ```bash
61
+ npx lines-db validate <path>
62
+ ```
63
+
64
+ ```bash
65
+ npx lines-db validate ./data
66
+
67
+ npx lines-db validate ./data/users.jsonl
68
+
69
+ npx lines-db validate ./data --verbose
70
+ ```
71
+
72
+ The command loads the corresponding schema files and checks each row. Validation errors include the file and details of the failure.
73
+
74
+ ### Migrate data
75
+
76
+ Apply a function to each row, validate the result, and save it to the JSONL file.
77
+
78
+ ```bash
79
+ npx lines-db migrate <file> <transform> [options]
80
+ ```
81
+
82
+ ```bash
83
+ npx lines-db migrate ./data/users.jsonl "(row) => ({ ...row, age: row.age + 1 })"
84
+
85
+ npx lines-db migrate ./data/users.jsonl "(row) => ({ ...row, active: true })" --filter "{ age: (age) => age > 18 }"
86
+
87
+ npx lines-db migrate ./data/users.jsonl "(row) => ({ ...row, age: row.age + 1 })" --errorOutput ./migrated.jsonl
88
+
89
+ npx lines-db migrate ./data "(row) => row" --fields id
90
+ ```
91
+
92
+ Available options:
93
+
94
+ - `--filter, -f <expr>`: Select rows with a filter expression.
95
+ - `--fields <list>`: Write back only the comma-separated fields. Other values remain as stored in the JSONL file. If omitted, write every field.
96
+ - `--errorOutput, -e <path>`: Save the transformed data to this path if migration fails.
97
+ - `--verbose, -v`: Show detailed error messages.
98
+
99
+ The migration runs in a transaction and validates all transformed rows before committing.
100
+
101
+ #### Write back selected fields
102
+
103
+ A normal migration writes whole rows back to the file, including schema defaults and fields that were omitted. Use `--fields` to keep other values as they were.
104
+
105
+ ```bash
106
+ npx lines-db migrate ./data/users.jsonl "(row) => row" --fields id
107
+ ```
108
+
109
+ Rows are matched by primary key, or by position when the file has no primary key yet, such as when filling in that key. Existing row order is preserved, and new rows are appended. If the file has no primary key and the row count has changed, the migration fails because the rows cannot be matched.
110
+
111
+ `--fields` applies to all target tables. Tables without the named fields are not written back, so one list can cover tables with different columns. A field absent from every table causes an error.
112
+
113
+ ### Fill missing values
114
+
115
+ ```bash
116
+ npx lines-db fill <path> [--fields id,createdAt]
117
+ ```
118
+
119
+ Set `path` to a data directory or a JSONL file. The command fills missing fields with values supplied by the validation schema. Without `--fields`, it fills each table's primary key.
120
+
121
+ Existing values are never replaced. Lines that gain no values remain unchanged, including line endings. Updated lines use the schema's key order. Rows that fail validation are not written. All values are computed before writing any files. If another tool changed a file after it was read, the command writes nothing and stops with a `JsonlConflictError` naming that file.
122
+
123
+ Use field names as stored in the file. When a `backward` transformation renames a primary key, the default target is the database's primary key name; pass the file's field name with `--fields`.
124
+
125
+ `fillFields()` accepts a function to compute values. This example uses a `hook` exported by the schema file. If the function throws, nothing is written.
126
+
127
+ ```typescript
128
+ import { fillFields, unwrap } from 'lines-db';
129
+
130
+ const { filled } = unwrap(
131
+ await fillFields({
132
+ path: './data',
133
+ fields: ['id'],
134
+ loadFiller: (schemaModule, { schemaPath }) => {
135
+ if (typeof schemaModule.hook !== 'function') throw new Error(`${schemaPath} does not export \`hook\``);
136
+ return schemaModule.hook;
137
+ },
138
+ }),
139
+ );
140
+ ```
141
+
142
+ The result's `tablesWithoutSchema` lists tables without schemas, `unreadableLines` lists lines that are not JSON objects, and `unproducedFields` lists fields for which no table produced a value.
143
+
144
+ ### Browse and Edit in the Browser
145
+
146
+ Install Studio in the project and start it with the CLI.
147
+
148
+ ```bash
149
+ npm install -D @lines-db/studio
150
+ npx lines-db studio ./data --open
151
+ ```
152
+
153
+ The default URL is `http://127.0.0.1:4848`. Changes are validated and written to the JSONL files when you save. See the [Studio documentation](https://github.com/toiroakr/lines-db/blob/main/studio/README.md) for editing, shared schemas, and multiple data directories.
154
+
155
+ ## TypeScript usage
156
+
157
+ ### Generate types
158
+
159
+ Generate a database config and types from the schemas. The default output is `<dataDir>/db.ts`.
160
+
161
+ ```bash
162
+ npx lines-db generate <dataDir>
163
+ ```
164
+
165
+ ```bash
166
+ npx lines-db generate ./data
167
+ ```
168
+
169
+ To run these commands through `package.json`:
170
+
171
+ ```json
172
+ {
173
+ "scripts": {
174
+ "db:validate": "lines-db validate ./data",
175
+ "db:generate": "lines-db generate ./data"
176
+ }
177
+ }
178
+ ```
179
+
180
+ ### Load data
181
+
182
+ Create `data/users.jsonl`.
183
+
184
+ ```text
185
+ {"id":1,"name":"Alice","age":30,"email":"alice@example.com"}
186
+ {"id":2,"name":"Bob","age":25,"email":"bob@example.com"}
187
+ {"id":3,"name":"Charlie","age":35,"email":"charlie@example.com"}
188
+ ```
189
+
190
+ Load the directory from TypeScript.
191
+
192
+ ```typescript
193
+ import { LinesDB, unwrap } from 'lines-db';
194
+
195
+ const db = LinesDB.create({ dataDir: './data' });
196
+ unwrap(await db.initialize());
197
+
198
+ const users = unwrap(db.find('users'));
199
+ console.log(users); // [{ id: 1, name: "Alice", ... }, ...]
200
+
201
+ const user = unwrap(db.findOne('users', { id: 1 }));
202
+ console.log(user); // { id: 1, name: "Alice", age: 30, ... }
203
+
204
+ const adults = unwrap(db.find('users', { age: (age) => age >= 30 }));
205
+
206
+ unwrap(await db.close());
207
+ ```
208
+
209
+ `unwrap()` returns the value from a successful `Result` or throws its error. See [Error handling](#error-handling) for handling failures explicitly.
210
+
211
+ ### Use generated types
212
+
213
+ The generated config infers row types from table names.
214
+
215
+ ```typescript
216
+ import { LinesDB, unwrap } from 'lines-db';
217
+ import { config } from './data/db.js';
218
+
219
+ const db = LinesDB.create(config);
220
+ unwrap(await db.initialize());
221
+
222
+ const users = unwrap(db.find('users'));
223
+
224
+ unwrap(
225
+ db.insert('users', {
226
+ id: 10,
227
+ name: 'Alice',
228
+ age: 30,
229
+ email: 'alice@example.com',
230
+ }),
231
+ );
232
+
233
+ unwrap(await db.close());
234
+ ```
235
+
236
+ ## Error handling
237
+
238
+ Methods in `LinesDB` and `JsonlReader` that can fail return `Result<T, Error>`. A successful result is `{ ok: true, value }`; a failed result is `{ ok: false, error }`. `getSchema`, `getTableNames`, and `getDb` return their values directly.
239
+
240
+ ```typescript
241
+ const result = db.insert('users', { id: 2, name: '' });
242
+
243
+ if (result.ok) {
244
+ console.log(result.value.changes);
245
+ } else {
246
+ console.log(result.error.message);
247
+ }
248
+ ```
249
+
250
+ `unwrap(result)` returns the value on success and throws the error on failure. Use it when a failure should stop the current operation.
251
+
252
+ ```typescript
253
+ import { unwrap } from 'lines-db';
254
+
255
+ const users = unwrap(db.find('users'));
256
+ ```
257
+
258
+ Inside a transaction, `tx` also returns Results. A failed `insert()` or `update()` does not roll back the transaction by itself. To abort on failure, use `unwrap()` or check the Result and throw with `throw result.error`.
259
+
260
+ Write through `tx` inside the transaction. Writes through `db` from other code would become part of the same transaction, so they are refused while it is open. SQL through `db.getDb()`, `db.execute()`, and `db.query()` is read-only during the transaction. `SELECT`, `VALUES`, `WITH`, `EXPLAIN`, and read-only pragmas such as `PRAGMA table_info(...)` are accepted. Run transaction control or pragmas that set values through `tx`.
261
+
262
+ ## API
263
+
264
+ The operations below return `Result<T, Error>` unless noted otherwise. `getSchema`, `getTableNames`, and `getDb` return their values directly.
265
+
266
+ ### Queries
267
+
268
+ - `find(table, where?)`: Find all matching records.
269
+ - `findOne(table, where?)`: Find one record.
270
+ - `query(sql, params?)`: Run a raw SQL query.
271
+
272
+ ### Changes
273
+
274
+ - `insert(table, data)`: Insert one record.
275
+ - `update(table, data, where)`: Update matching records.
276
+ - `delete(table, where)`: Delete matching records.
277
+
278
+ ### Batch operations
279
+
280
+ - `batchInsert(table, data[])`: Insert several records.
281
+ - `batchUpdate(table, updates[])`: Update several records.
282
+ - `batchDelete(table, where)`: Delete several records.
283
+
284
+ ### Transactions and schemas
285
+
286
+ - `transaction(fn)`: Run operations in a transaction.
287
+ - `sync(table?, options?)`: Write changes back to the JSONL files.
288
+ - `getSchema(table)`: Get the schema. Returns `TableSchema | undefined` directly.
289
+ - `validateRow(table, row)`: Validate a row, including a row from a table excluded on load due to validation errors. Returns `Result<JsonObject, ValidationError>`.
290
+ - `getTableNames()`: Get all table names. Returns `string[]` directly.
291
+
292
+ ### Query conditions
293
+
294
+ ```typescript
295
+ unwrap(db.find('users', { age: 30 }));
296
+
297
+ unwrap(db.find('users', { age: 30, name: 'Alice' }));
298
+
299
+ unwrap(
300
+ db.find('users', {
301
+ age: (age) => age > 25,
302
+ name: (name) => name.startsWith('A'),
303
+ }),
304
+ );
305
+ ```
306
+
307
+ ### JSON columns
308
+
309
+ Objects and arrays are stored as JSON columns and returned as their original values.
310
+
311
+ ```typescript
312
+ unwrap(
313
+ db.insert('orders', {
314
+ id: 1,
315
+ items: [{ name: 'Laptop', quantity: 1 }],
316
+ metadata: { source: 'web' },
317
+ }),
318
+ );
319
+
320
+ const order = unwrap(db.findOne('orders', { id: 1 }));
321
+ console.log(order.items[0].name); // "Laptop"
322
+ ```
323
+
324
+ ### Schema transformations
325
+
326
+ If a schema converts date strings to `Date` objects on load, define a `backward` transformation to convert them to strings when saving. JSONL stores the strings; the application works with `Date` objects.
327
+
328
+ ```typescript
329
+ import * as v from 'valibot';
330
+ import { defineSchema } from 'lines-db';
331
+
332
+ const eventSchema = v.pipe(
333
+ v.object({
334
+ id: v.number(),
335
+ date: v.pipe(
336
+ v.string(),
337
+ v.isoDate(),
338
+ v.transform((str) => new Date(str)),
339
+ ),
340
+ }),
341
+ );
342
+
343
+ export const schema = defineSchema(eventSchema, {
344
+ backward: (output) => ({
345
+ ...output,
346
+ date: output.date.toISOString().slice(0, 10),
347
+ }),
348
+ });
349
+ ```
350
+
351
+ Store the date as a string in `events.jsonl`.
352
+
353
+ ```text
354
+ {"id":1,"date":"2024-01-01"}
355
+ ```
356
+
357
+ The loaded row exposes the date as a `Date`.
358
+
359
+ ```typescript
360
+ const event = unwrap(db.findOne('events', { id: 1 }));
361
+ console.log(event.date instanceof Date); // true
362
+ console.log(event.date.getFullYear()); // 2024
363
+ ```
364
+
365
+ ### Transactions
366
+
367
+ Changes outside a transaction are automatically synced to the JSONL file.
368
+
369
+ ```typescript
370
+ unwrap(db.insert('users', { id: 10, name: 'Alice', age: 30 }));
371
+ ```
372
+
373
+ Sync preserves the original row order and appends new rows.
374
+
375
+ Use a transaction to save several changes together.
376
+
377
+ ```typescript
378
+ unwrap(
379
+ await db.transaction(async (tx) => {
380
+ unwrap(tx.insert('users', { id: 10, name: 'Alice', age: 30 }));
381
+ unwrap(tx.update('users', { age: 31 }, { id: 1 }));
382
+ }),
383
+ );
384
+ ```
385
+
386
+ Use `unwrap()` inside the callback to throw on a failed operation and roll back the transaction.
387
+
388
+ After the callback finishes, changed tables are written back before committing. All target files are checked before the first write. If write-back fails, the transaction is rolled back and files already written are restored. If restoration also fails, that file keeps its changes.
389
+
390
+ Unchanged tables are not written back. However, SQL that changes rows through `tx.execute()` or `tx.query()` writes back every table because the changed tables cannot be identified. Calling `sync()` inside the callback returns an error; the transaction handles write-back at the end.
391
+
392
+ ### Files changed after loading
393
+
394
+ The database records each JSONL file's contents when reading or writing it. If an editor or another tool has changed or deleted the file since then, sync leaves it untouched and returns a `JsonlConflictError` naming the file.
395
+
396
+ ```typescript
397
+ const result = await db.transaction((tx) => unwrap(tx.update('users', { age: 31 }, { id: 1 })));
398
+
399
+ if (!result.ok && result.error.name === 'JsonlConflictError') {
400
+ console.log(`${(result.error as JsonlConflictError).file} がディスク上で変更されています`);
401
+ }
402
+ ```
403
+
404
+ To load external changes, recreate the database, call `initialize()`, and retry the write. A transaction writes back only changed tables and rolls back the database changes if a conflict occurs.
405
+
406
+ With `sync()` or automatic sync outside a transaction, database changes remain after a failed write-back. A `sync()` without a table name targets every table, so a change to any file causes it to fail. Automatic sync reports errors through `console.error`.
407
+
408
+ Files are not locked between checking their contents and writing. Changes saved by another process during that interval are overwritten. This is intended for one person editing local files; it does not coordinate concurrent writers.
409
+
410
+ `hasExternalChanges()` detects changes, additions, and deletions of JSONL and schema files since the last read or write. `findExternalChanges()` lists the affected files. Use them to detect edits made by other tools and reload data in a long-running process.
411
+
412
+ ```typescript
413
+ if (unwrap(await db.hasExternalChanges())) {
414
+ await db.close();
415
+ db = LinesDB.create(config);
416
+ unwrap(await db.initialize());
417
+ }
418
+ ```
419
+
420
+ ### Values the Schema Fills In
421
+
422
+ Normal sync writes whole rows, including schema defaults and computed values. With `writeFilledValues: 'primaryKey'`, it writes fields present in the file, passed to `insert()`, or changed by `update()`. Other defaults remain omitted. Generated primary keys are saved so the row keeps its identity on the next load.
423
+
424
+ ```typescript
425
+ const db = LinesDB.create({ dataDir: './data', writeFilledValues: 'primaryKey' });
426
+ // people.jsonl: {"id":1,"name":"Alice"}
427
+ unwrap(await db.transaction((tx) => unwrap(tx.update('people', { name: 'Alicia' }, { id: 1 }))));
428
+ // people.jsonl: {"id":1,"name":"Alicia"}
429
+ ```
430
+
431
+ Use `sync(tableName, { writeFilledValues })` to override the setting for one sync. Setting a field to its existing value is not a change, so setting a defaulted field to that same value does not write it to the file. Fields explicitly named in `writeBackFields` or `sync(..., { fields })` are written even when the schema supplied them.
432
+
433
+ `resetToDefault` restores a field's schema default. With `writeFilledValues: 'primaryKey'`, that field is removed from the file.
434
+
435
+ ```typescript
436
+ unwrap(db.update('people', {}, { id: 1 }, { resetToDefault: ['age'] }));
437
+ ```
438
+
439
+ `findWithDefaults()` returns each row and the names of fields supplied by the schema. Use it to distinguish defaults from values stored in the file.
440
+
441
+ ```typescript
442
+ unwrap(await db.findWithDefaults('people'));
443
+ // [{ row: { id: 1, name: 'Alicia', age: 20 }, defaulted: ['age'] }]
444
+ ```
445
+
446
+ Rows whose `backward` transformation renames fields, or rows added by SQL with no original row or write record, are written in full because explicitly supplied fields cannot be identified. A table changed through SQL also has all rows written back. Fields set by a migration `transform` on load count as explicitly supplied.
447
+
448
+ Unknown fields from the original row retain their position on write-back. Schemas that strip unknown keys, such as Valibot's `v.object()`, allow those rows to pass validation. Use `v.strictObject()` or another schema that rejects unknown keys to report them as errors.
449
+
450
+ ### Write back selected fields
451
+
452
+ When fields are specified, their database values are written even if the schema supplied them. Other values remain as stored in the file.
453
+
454
+ ```typescript
455
+ // users.jsonl: {"name":"Alice"}
456
+ unwrap(await db.sync('users', { fields: ['id'] }));
457
+ // users.jsonl: {"id":"...","name":"Alice"}
458
+ ```
459
+
460
+ Set `writeBackFields` in the config to apply the rule to every sync, including automatic sync after inserts, updates, and transactions.
461
+
462
+ ```typescript
463
+ const db = LinesDB.create({ dataDir: './data', writeBackFields: ['id'] });
464
+ ```
465
+
466
+ Rows are matched by primary key, or by position when the file has no primary key yet. Row order is preserved, and new rows are appended. Selected fields use the database value, including null. If rows cannot be matched, `sync()` returns a failed Result.
467
+
468
+ New fields are inserted in schema order. For example, an `id` declared first is inserted at the beginning of the row when filled later. Existing keys do not move, and unknown keys stay after declared keys.
469
+
470
+ Key order is read from the rows produced by the schema. Fields produced first are ordered first; fields first encountered in later rows follow them. Set `mergeFields`'s `keyOrder` to specify the order explicitly.
471
+
472
+ A `sync()` for a specific table rejects fields that the table does not have. Sync across all tables and the config's `writeBackFields` skip tables without those fields, so the same list works for different column sets.
473
+
474
+ ### Edit rows without a database
475
+
476
+ `mergeFields` takes the original row and a computed row and returns a row with only the selected fields updated. Use it to edit files without loading them into SQLite, such as when a hook supplies IDs.
477
+
478
+ ```typescript
479
+ import { JsonlReader, JsonlWriter, mergeFields, unwrap } from 'lines-db';
480
+
481
+ const rows = unwrap(await JsonlReader.read('./data/users.jsonl'));
482
+ const filled = rows.map((row) => mergeFields(row, fillIds(row), { fields: ['id'] }));
483
+ await JsonlWriter.write('./data/users.jsonl', filled);
484
+
485
+ // {"name":"Alice"} -> {"id":"018f...","name":"Alice"}
486
+ ```
487
+
488
+ Fields outside the selection are not validated. Even if their values would fail the schema, selected fields can still be updated. Fields absent from the computed row keep their original values. If computed key order differs from schema order, use `keyOrder` to set the position of new keys.
489
+
490
+ ## Configuration
491
+
492
+ ```typescript
493
+ interface DatabaseConfig {
494
+ dataDir: string | readonly string[];
495
+ schemaDir?: string;
496
+ writeDataSets?: boolean;
497
+ writeBackFields?: readonly string[];
498
+ }
499
+
500
+ const db = LinesDB.create({ dataDir: './data' });
501
+ ```
502
+
503
+ ### Data sets
504
+
505
+ Split shared seed data from scenario-specific data and load the directories you need together.
506
+
507
+ ```
508
+ data/
509
+ Item.schema.ts Item.jsonl # schemas and base data
510
+ ItemValuation.schema.ts
511
+ cogs/
512
+ Item.jsonl # additional Item rows
513
+ ItemValuation.jsonl # references Item rows from both sets
514
+ ```
515
+
516
+ ```typescript
517
+ const db = LinesDB.create({ dataDir: ['./data', './data/cogs'], schemaDir: './data' });
518
+ const result = unwrap(await db.initialize({ detailedValidate: true }));
519
+ ```
520
+
521
+ Rows for the same table are concatenated in `dataDir` order. Validation, unique constraints, and foreign keys are checked across all rows. `cogs/ItemValuation.jsonl` can reference rows from `data/Item.jsonl`. Duplicate IDs across sets cause a constraint violation. Errors identify the source file and row within it.
522
+
523
+ Multiple directories require `schemaDir` to locate shared schemas. It can also be used with one directory. If omitted for a single directory, schemas are looked up next to the JSONL files.
524
+
525
+ Databases with multiple directories are read-only by default. Set `writeDataSets: true` to write updates and deletions back to their source files. Inserts require an explicit configured directory.
526
+
527
+ ```typescript
528
+ const db = LinesDB.create({ dataDir: ['./data', './data/cogs'], schemaDir: './data', writeDataSets: true });
529
+ unwrap(await db.initialize());
530
+ unwrap(
531
+ await db.transaction((tx) => {
532
+ const inserted = tx.insert('Item', { id: 'new-item', name: 'New item' }, { dataDir: './data/cogs' });
533
+ if (!inserted.ok) throw inserted.error;
534
+ }),
535
+ );
536
+ ```
537
+
538
+ Use `insert()` with a destination to add rows across multiple directories. `batchInsert()` has no destination argument. SQL through `execute()`, `query()`, `queryOne()`, and `getDb()` remains read-only to preserve each row's source location.
539
+
540
+ Transactions check target files before writing and restore files already written if a later write fails. Studio enables `writeDataSets` automatically.
541
+
542
+ ## Type mapping
543
+
544
+ | JSON type | Column type | SQLite storage |
545
+ | ---------------- | ----------- | -------------- |
546
+ | number (integer) | INTEGER | INTEGER |
547
+ | number (float) | REAL | REAL |
548
+ | string | TEXT | TEXT |
549
+ | boolean | INTEGER | INTEGER |
550
+ | object | JSON | TEXT |
551
+ | array | JSON | TEXT |
552
+
553
+ ## License
554
+
555
+ MIT