Saving Data to Views
To save changes to a view, specify the target view as INSERT, UPDATE, and DELETE objects.
Here is a sample for the xls.objects table:
ID | TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE | TABLE_CODE | INSERT_OBJECT | UPDATE_OBJECT | DELETE_OBJECT |
---|---|---|---|---|---|---|---|
s02 | view_cashbook | VIEW | s02.view_cashbook | s02.view_cashbook | s02.view_cashbook | ||
s02 | usp_cashbook | PROCEDURE | s02.view_cashbook | s02.view_cashbook | s02.view_cashbook | ||
s02 | code_cashbook | CODE | <SQL> | s02.view_cashbook | s02.view_cashbook | s02.view_cashbook |
Here is a sample for the QueryList view:
ID | TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE | TABLE_CODE | INSERT_PROCEDURE | UPDATE_PROCEDURE | DELETE_PROCEDURE | PROCEDURE_TYPE |
---|---|---|---|---|---|---|---|---|
s02 | view_cashbook | VIEW | s02.view_cashbook | s02.view_cashbook | s02.view_cashbook | |||
s02 | usp_cashbook | PROCEDURE | s02.view_cashbook | s02.view_cashbook | s02.view_cashbook | |||
s02 | code_cashbook | CODE | <SQL> | s02.view_cashbook | s02.view_cashbook | s02.view_cashbook |
SaveToDB 8+, DBEdit, DBGate, and ODataDB create such configurations automatically if the target view can be detected and the view is updatable.
For example, if a user has the VIEW DEFINITION permission and a view or stored procedure has the code like SELECT * FROM s02.view_cashbook.
Target views must be updatable and have primary key or identity columns.
Implementation Details
SaveToDB and DBEdit generate and execute INSERT, UPDATE, and DELETE commands themselves.
DBGate uses INSERT, UPDATE, and DELETE commands on the server-side according to POST, PUT, and DELETE commands.
ODataDB creates EntitySets for views and FunctionImports with the target EntitySet for stored procedures and SQL codes.