-
Notifications
You must be signed in to change notification settings - Fork 9
Stored Procedures
Peter Girard edited this page Apr 18, 2017
·
9 revisions
In most cases the GPV does not directly accesses database tables and views. Instead, access to tabular data is mediated by stored procedures in the database. These procedures have well-defined inputs and outputs and hide the complexity of business logic from the GPV. Be sure you understand the difference between map and data IDs before authoring your stored procedures.
| Stored Procedure | Input | Output |
| Search | single result set with one row | |
| Search Autocomplete | text | single result set with multiple rows |
| Search List | single result set with multiple rows | |
| Query | map ID list | single result set with multiple rows |
| Data Tab | data ID | one or more result sets with multiple rows |
| Map Tip | map ID | single result set with one row |
| Identify | map ID | one or more result sets with multiple rows |
| Mailing Label | data ID list | single result set with multiple rows |
| Export | data ID list | single result set with multiple rows |
| Target Parameters | any | single result set with one column of map IDs |
- Some stored procedures take in a text string containing a comma-delimited list of IDs which must be converted to an in-memory table for processing using a list-to-table conversion function.
- You should modularize your stored procedures to improve performance and to eliminate redundant code.
- You can embed links and images in your data tabs.
- Target parameters are surprisingly useful.