retrieve rows from a PersistentTable connection
retrieve partial rows from a PersistentTable connection
count rows in a PersistentTable connection
GetAll(connection, cond1, cond2, ...)
GetKeys(connection, cond1, cond2, ...)
Count(connection, cond1, cond2, ...)
PersistentTable object created with the Open command
cond1, cond2, ...
expression sequence of conditions involving the column names of connection
The GetAll command retrieves all rows from a PersistentTable object that satisfy all of the specified conditions. The result is a set of lists, one for each row. Each such list contains all values for one row.
The GetKeys command retrieves all rows from a PersistentTable object that satisfy all of the specified conditions. The result is a set of lists, one for each row. Each such list contains the primary key values for one row. This can be considerably faster than the GetAll command if there are many columns outside the primary key and many rows in the result.
The Count command counts all rows from a PersistentTable object that satisfy all of the specified conditions. The returned value is the number of such rows.
Each condition must have one of the following forms:
expr1 = expr2, expr1 <> expr2, expr1 < expr2, expr1 > expr2, expr1 <= expr2, expr1 >= expr2
where expr1 and expr2 are polynomial expressions in the column names of connection of types integer or float. These conditions are evaluated in the SQLite database engine, so Maple's standard rules for precision in floating-point arithmetic are not followed.
c = expr, c <> expr
where c is a column name of connection of type anything or boolean. Boolean columns can only be compared to the constants true and false.
If you expect a particular query to occur frequently, it can be very beneficial to add a suitable index. See the Open command for how to do that.
Persistent tables are in general thread safe as of Maple 2021; see the Thread Safety section of the PersistentTable overview page for more details and caveats.
For more information on thread safety, see index/threadsafe.
connection≔<< 4-column persistent table at :memory: >>
If we omit all conditions, then all rows of the table are part of the result.
Here we demonstrate a simple equality condition.
More complicated conditions.
The PersistentTable[GetAll], PersistentTable[GetKeys] and PersistentTable[Count] commands were introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
Download Help Document
What kind of issue would you like to report? (Optional)