Has - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


PersistentTable

  

Has

  

query a PersistentTable connection for the existence of a row

 

Calling Sequence

Parameters

Description

Thread Safety

Examples

Compatibility

Calling Sequence

Has(connection, keys)

Parameters

connection

-

PersistentTable object created with the Open command

keys

-

expression sequence of values for the key columns

Description

• 

The Has command returns true if the given connection contains a row with the given values in the primary key columns, and false otherwise.

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

> 

with⁡PersistentTable

Close,Count,Get,GetAll,GetKeys,Has,MaybeGet,Open,RawCommand,Set

(1)
> 

connection≔Open⁡:memory:,style=k1::anything,k2::integer,v::anything,primarykey=2

connection≔<< 3-column persistent table at :memory: >>

(2)
> 

connectionx,3≔y2

connectionx,3≔y2

(3)
> 

connectionz,5≔y3

connectionz,5≔y3

(4)
> 

Has⁡connection&comma;x&comma;3

true

(5)
> 

Has⁡connection&comma;a&comma;4

false

(6)
> 

Close⁡connection

Compatibility

• 

The PersistentTable[Has] command was introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.

See Also

PersistentTable

PersistentTable[Open]