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

Online Help

All Products    Maple    MapleSim


Result

  

DeleteRow

  

delete a row from the table

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

result:-DeleteRow( )

Parameters

result

-

Result module

Description

• 

DeleteRow removes the row indicated by the row cursor from the database.

• 

The row cursor can be moved by calling Next, Previous, First, Last, and GotoRow.

• 

Not all Result modules can be updated.  Only Result modules representing tables containing data from a single table (no joins) and a column of primary keys are guaranteed to be updatable.  Particular JDBC Drivers and databases may allow a wider range of updatable tables and thus Result modules.

Examples

> 

driver≔DatabaseLoadDriver⁡:

> 

conn≔driver:-OpenConnection⁡url,name,pass:res≔conn:-ExecuteQuery⁡SELECT id,name,number,mass FROM animals:res:-ToMaple⁡output=Array

1fish1000.01000000000000000022dog1020.50000000000000003cat105.500000000000000004rat500.5000000000000000005horse3400.3000000000000116snake17.750000000000000007lizard50.1000000000000000048parrot202.9pig410.10hamster300.200000000000000012

(1)
> 

res:-First⁡

true

(2)
> 

res:-GetRowIndex⁡

1

(3)
> 

res:-GetData⁡id

1

(4)
> 

res:-DeleteRow⁡;res:-First⁡

true

(5)
> 

res:-ToMaple⁡output=Array

2dog1020.50000000000000003cat105.500000000000000004rat500.5000000000000000005horse3400.3000000000000116snake17.750000000000000007lizard50.1000000000000000048parrot202.9pig410.10hamster300.200000000000000012

(6)
> 

res:-GotoRow⁡5

true

(7)
> 

res:-GetRowIndex⁡

5

(8)
> 

res:-GetData⁡id

6

(9)
> 

res:-DeleteRow⁡;res:-First⁡

true

(10)
> 

res:-ToMaple⁡output=Array

2dog1020.50000000000000003cat105.500000000000000004rat500.5000000000000000005horse3400.3000000000000117lizard50.1000000000000000048parrot202.9pig410.10hamster300.200000000000000012

(11)
> 

res:-GotoRow⁡7

true

(12)
> 

res:-GetRowIndex⁡

7

(13)
> 

res:-GetData⁡id

9

(14)
> 

res:-DeleteRow⁡;res≔conn:-ExecuteQuery⁡SELECT id,name,number,mass FROM animals:res:-ToMaple⁡output=Array

2dog1020.50000000000000003cat105.500000000000000004rat500.5000000000000000005horse3400.3000000000000117lizard50.1000000000000000048parrot202.10hamster300.200000000000000012

(15)

See Also

Database

Database[Connection][ExecuteQuery]

Database[PreparedStatement][Execute]

Database[Result]

Database[Result][First]

Database[Result][GotoRow]

Database[Result][Last]

Database[Result][Next]

Database[Result][Previous]

Database[Statement]

Database[Statement][Execute]

Database[usage]