How to Configure Query Lists in SaveToDB
Query lists help you tackle the following tasks:
- Define objects available for connection
- Specify objects using SQL code
- Specify objects using HTTP requests
- Specify objects using text file queries
- Configure saving changes
- Configure data merging
Query list views must include the following fields:
TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE | TABLE_CODE | INSERT_PROCEDURE | UPDATE_PROCEDURE | DELETE_PROCEDURE | PROCEDURE_TYPE |
---|---|---|---|---|---|---|---|
You can optionally include a first ID column in query list views.
Query list views are similar to the xls.objects table, but there are key differences:
- Users must select a query list in the SaveToDB/DBEdit Connection Wizard or via the DBGate/ODataDB URL, while the xls.objects configuration loads by default.
- Query lists allow you to select objects available for connection, whereas the xls.objects table is limited to configuring objects.
- Query lists enable on-the-fly configuration creation, such as based on user permissions.
- Objects defined in xls.objects can be used as handlers in the xls.handlers table.
You can create query list views from scratch or use the xls.queries view as a source.
Query list views consist of two logical parts.
The left part specifies the configured objects:
TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE | TABLE_CODE |
---|---|---|---|
<schema> | <table name> | TABLE | |
<schema> | <view name> | VIEW | |
<schema> | <procedure name> | PROCEDURE | |
<schema> | <new name> | CODE | <SQL> |
<schema> | <new name> | HTTP | <HTTP Command> |
<schema> | <new name> | TEXT | <Text file query> |
Objects defined using SQL code, HTTP commands, or text file queries have nearly the same features as native database objects.
For more details, see:
- Getting Data from Tables and Views
- Getting Data from Stored Procedures
- Getting Data Using SQL Queries
- Getting Data Using OData
- Getting Data Using REST API
- Getting Data from the Web
- Getting Data from Text Files
The right part is used to configure saving changes and merging data.
Here are the available options:
INSERT_PROCEDURE | UPDATE_PROCEDURE | DELETE_PROCEDURE | PROCEDURE_TYPE |
---|---|---|---|
<schema>.<table name> | <schema>.<table name> | <schema>.<table name> | |
<schema>.<view name> | <schema>.<view name> | <schema>.<view name> | |
<schema>.<procedure name> | <schema>.<procedure name> | <schema>.<procedure name> | |
<schema>.<procedure name> | |||
<SQL> | <SQL> | <SQL> | |
<SQL> | |||
<schema>.<table name> | |||
<schema>.<view name> | |||
<schema>.<procedure name> | |||
<SQL> | |||
<HTTP Command> | <HTTP Command> | <HTTP Command> |
For additional notes, refer to: