Skip to content

Commit 70b8673

Browse files
committed
[docs] DpcTabularCondition
1 parent f39a237 commit 70b8673

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

src/@types/persisters/docs.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,24 @@
486486
*/
487487
/// DpcTabular.timesTableSuffix
488488
}
489+
490+
/**
491+
* The DpcTabularCondition type describes the SQL WHERE clause that will be used
492+
* to filter the rows that are loaded and saved to in the Store Table.
493+
*
494+
* This provides a way to enact pagination or selective loading of data from the
495+
* database into TinyBase so that only a fraction of the full data in the
496+
* database is loaded into memory.
497+
*
498+
* This clause must include at least one `$tableName` placeholder for the table
499+
* name. For example, if you only wanted to load and save records that have an
500+
* 'active' flag set, this string would be something like `$tableName.active =
501+
* 1`.
502+
* @category Configuration
503+
* @since v6.1.0
504+
*/
505+
/// DpcTabularCondition
506+
489507
/**
490508
* The DpcTabularLoad type describes the configuration for loading Tables in a
491509
* database-oriented Persister that is operating in tabular mode.
@@ -498,7 +516,7 @@
498516
* |-|-|-|
499517
* |`tableId`|Id|The Id of the Store Table into which data from this database table should be loaded.|
500518
* |`rowIdColumnName?`|string|The optional name of the column in the database table that will be used as the Row Ids in the Store Table, defaulting to '_id'.|
501-
* |`condition?`|string|The optional SQL WHERE clause that will be used to filter the rows that are loaded into the Store Table. When set it must include the `$tableName` placeholder for the table name.|
519+
* |`condition?`|string|The optional SQL WHERE clause that will be used to filter the rows that are loaded into the Store Table. When set it must include the `$tableName` placeholder for the table name, since v6.1.0.|
502520
*
503521
* As a shortcut, if you do not need to specify a custom `rowIdColumnName`, you
504522
* can simply provide the Id of the Store Table instead of the whole object.
@@ -613,7 +631,7 @@
613631
* |`rowIdColumnName?`|string|The optional name of the column in the database table that will be used to save the Row Ids from the Store Table, defaulting to '_id'.|
614632
* |`deleteEmptyColumns?`|boolean|Whether columns in the database table will be removed if they are empty in the Store Table, defaulting to false.|
615633
* |`deleteEmptyTable?`|boolean|Whether tables in the database will be removed if the Store Table is empty, defaulting to false.|
616-
* |`condition?`|string|The optional SQL WHERE clause that will be used to scope cleanup operations to the Store Table. When set it must include the `$tableName` placeholder for the table name. Defaults to `DpcTabularLoad.condition`.|
634+
* |`condition?`|string|The optional SQL WHERE clause that will be used to scope cleanup operations to the Store Table. When set it must include the `$tableName` placeholder for the table name, since v6.1.0. Defaults to `DpcTabularLoad.condition`.|
617635
*
618636
* As a shortcut, if you do not need to specify a custom `rowIdColumnName`, or
619637
* enable the `deleteEmptyColumns` or `deleteEmptyTable` settings, you can

0 commit comments

Comments
 (0)