PersistentTable/Close - Maple Help

PersistentTable

 Close
 close a PersistentTable connection

 Calling Sequence Close(connection)

Parameters

 connection - PersistentTable object created with the Open command

Description

 • The Close command disconnects a PersistentTable object from its connected database file and releases the associated resources.

 • 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.

Examples

 > $\mathrm{with}\left(\mathrm{PersistentTable}\right)$
 $\left[{\mathrm{Close}}{,}{\mathrm{Count}}{,}{\mathrm{Get}}{,}{\mathrm{GetAll}}{,}{\mathrm{GetKeys}}{,}{\mathrm{Has}}{,}{\mathrm{MaybeGet}}{,}{\mathrm{Open}}{,}{\mathrm{RawCommand}}{,}{\mathrm{Set}}\right]$ (1)
 > $\mathrm{connection}≔\mathrm{Open}\left(":memory:",\mathrm{style}=\left[k::'\mathrm{integer}',v::\mathrm{anything}\right]\right)$
 ${\mathrm{connection}}{≔}{\mathrm{<< 2-column persistent table at :memory: >>}}$ (2)
 > $\mathrm{connection}\left[1\right]≔x+1$
 ${{\mathrm{connection}}}_{{1}}{≔}{x}{+}{1}$ (3)
 > $\mathrm{connection}\left[25\right]≔"test"$
 ${{\mathrm{connection}}}_{{25}}{≔}{"test"}$ (4)
 > $\mathrm{Close}\left(\mathrm{connection}\right)$

Compatibility

 • The PersistentTable[Close] command was introduced in Maple 2021.