Overview of the Database Package
Calling Sequence
Description
List of Database Package Commands
List of Driver Module Exported Commands
List of Connection Module Exported Commands
List of PreparedStatement Module Exported Commands
List of Statement Module Exported Commands
List of Result Module Exported Commands
List of SQLite Subpackage Commands
List of DataInterface Module Exported Commands
Database:-command(arguments)
command(arguments)
The Database Integration Toolbox is implemented as the Database package, which provides commands and Maplet applications for using databases.
Using the Connection Builder Maplet application, you can easily open database connections.
The Database package uses Structured Query Language (SQL) to communicate with the database. Using the Query Builder Maplet application, you can query a database without any knowledge of SQL.
Data is automatically converted between database and Maple format to allow native manipulation in each environment.
The Database package uses Java Database Connectivity (JDBC). To connect to a database, Maple must be able to access the JDBC driver for that database. For more information on JDBC drivers, see JDBC.
For information on JDBC compatibility, see compatibility.
To use the Database package, you must first open a connection to a database using one of the following methods.
- Establish a connection using the Connection Builder Maplet application.
- Re-establish a connection that was saved using the Save command or Connection Builder Maplet application, using the LoadConnection command.
- Load a JDBC driver module using the LoadDriver command, and then open a connection to a database using the OpenConnection command exported by the driver module.
After establishing a connection, you can query the database using the Query Builder Maplet application or query and update the database using commands.
For more information on using the Database package, see the Introduction to Using the Database Package help page and Database Integration example worksheet.
The Database package has an object-oriented design. The package contains a small number of commands, some of which return modules. The modules provide the majority of the functionality. To use the commands in a returned module, you must assign the module to a name. For example, the LoadDriver command returns a driver module that exports the commands OpenConnection and Close. To open a connection using this driver, use the driver_name:-OpenConnection(arguments) calling sequence.
Note: The calling sequence does not require Database:- because the driver_name module is not an export of the Database package.
You can use the Database package with any database that supports JDBC. However, JDBC support is incomplete for some databases. Therefore, not all Database features may be available for every database. The behavior of the Database package in these situations in database dependent.
ConnectionBuilder
LoadConnection
LoadDriver
QueryBuilder
RemoveConnection
Close
OpenConnection
For more information, see Driver.
Commit
CreatePreparedStatement
CreateStatement
ExecuteQuery
ExecuteUpdate
GetCatalogs
GetColumns
GetOptions
GetSchemas
GetTables
Rollback
Save
SetOptions
For more information, see Connection.
Execute
NextResult
For more information, see PreparedStatement.
For more information, see Statement.
DeleteRow
First
GetColumnCount
GetData
GetName
GetRowCount
GetRowIndex
GetType
GotoRow
InsertRow
Last
Next
Previous
ToMaple
UpdateData
UpdateRow
For more information, see Result.
Attach
Bind
ClearBindings
ColumnCount
ColumnNames
Fetch
FetchAll
FetchRow
Finalize
Open
Opened
Prepare
Reset
Step
For more information, see SQLite
Get
Read
Skip
Type
For more information, see DataInterface.
To display the help page for a particular Database command, see Getting Help with a Command in a Package.
See Also
Connection Builder Maplet application
Database Integration example worksheet
Database[compatibility]
Database[JDBC]
Database[usage]
help
module
Query Builder Maplet application
symbol
UsingPackages
with
Download Help Document