GetData - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Result

  

GetData

  

get the data stored in a column of the current row

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

result:-GetData( index, opt )

Parameters

result

-

Result module

index

-

string or integer; the column from which to get the data

opt

-

(optional) equation of the form stream=boolean

Description

• 

GetData returns the data element in the row indicated by the row cursor and in the column index.

• 

GetData accepts one optional argument that affects the format of the returned value.

  

stream = true or false

  

For some large binary and character elements it may be inconvenient or even impossible to transfer the entire object to Maple at once.  By passing stream=true, GetData will return a DataInterfaceStream module instead of the object.  The DataInterfaceStream module allows the data to be retrieved in pieces.  stream=true is valid only for elements of type CHAR, VARCHAR, LONGVARCHAR, BINARY, VARBINARY, and LONGVARBINARY.

• 

If index is an integer, it is the index of the column in the table. If index is a string, then it is the name of the column.

• 

If the current row is not a data row, then an error is raised.

• 

Using GetData and Next is the preferred method for walking the data of a Result module.

Examples

Create a Result.

driverDatabaseLoadDriver:

conndriver:-OpenConnectionurl,name,pass:resconn:-ExecuteQuerySELECT id,name,number,mass FROM animals:res:-Next

true

(1)

res:-GetData1

1

(2)

res:-GetData2

fish

(3)

res:-GetData3

100

(4)

res:-GetData4

0.0100000000000000002

(5)

res:-GetDataid

1

(6)

res:-GetDataname

fish

(7)

res:-GetDatanumber

100

(8)

res:-GetDatamass

0.0100000000000000002

(9)

resconn:-ExecuteQuerySELECT * FROM stream:res:-Next

true

(10)

res:-GetData1

the quick brown fox jumped over the lazy dog

(11)

res:-GetData2

[   1..127 1-D Array    ]

[ Data Type: integer[1] ]

[ Storage: rectangular  ]

[    Order: C_order     ]

strres:-GetData1,stream=true:str:-Read5

the q

(12)

str:-Skip5;str:-Read5

brown

(13)

strres:-GetData2,stream=true:str:-Read5

1,2,3,4,5

(14)

str:-Skip5;str:-Read5

11,12,13,14,15

(15)

See Also

Database

Database[DataInterfaceStream]

Database[Result]

Database[Result][GotoRow]

Database[Result][Last]

Database[Result][Next]

Database[Result][Previous]

Database[Result][UpdateData]

Database[usage]