PersistentTable/Close - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : PersistentTable/Close

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.

Thread Safety

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

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.
 • For more information on Maple 2021 changes, see Updates in Maple 2021.

 See Also