@@ -17,7 +17,7 @@ Data files must contain `table` and `records` fields. The `database` field is op
1717
1818### JSON Example
1919
20- ``` json
20+ ``` jsonc
2121{
2222 " database" : " dev" , // Optional - uses default database if omitted
2323 " table" : " Product" , // Required - name of the table
@@ -45,11 +45,13 @@ records: # Required - array of records
4545## Key Features
4646
4747- **Automatic Table Creation**: Tables are created if they don't exist
48- - **Primary Key Detection**: The ` id` field is automatically detected as the primary key
48+ - **Schema Inference**:
49+ - The system will automatically infer a schema from the first record when creating a new table
50+ - The ` id` field is automatically detected as the primary key
51+ - It's preferred to define the schema explicitly in your application, but this provides a quick start
4952- **File Modification Time**:
5053 - The data loader uses the file's modification time (`mtime`) to determine if records should be updated
5154 - " Touching" a file (updating its modification time) will force a reload of its data
52- - This allows for simpler data files without timestamp properties in the records
5355- **Multi-file Support**: You can have multiple data files for different tables
5456- **Complex Data Types**: Supports nested objects, arrays, and various data types
5557- **One Table Per File**: Each file should define one table
@@ -62,12 +64,4 @@ records: # Required - array of records
6264 touch data/products.json
6365 ` ` `
6466- If you need to restore to previous data, you can replace the file and update its timestamp
65- - The system automatically handles the comparison between file modification time and record timestamps
66-
67- # # Sample Files
68-
69- - `categories.json` : Category data with parent/child relationships
70- - `products.json` : Product data with references to categories
71- - `users.json` : User account data
72-
73- These sample files demonstrate common data patterns and relationships.
67+ - The system automatically handles the comparison between file modification time and record timestamps
0 commit comments