Using Store Procedures
Sometimes you need some data that requires executing complex queries; for that, you may want to use stored procedures in the SQL Database1. GraphQL Query Signature
2. Parameters
- name (required): Name of the stored procedure
- params (optional): JSON object with stored procedure parameters
- limit (optional): Result limit (can be passed directly or inside params).
- offset (optional): Offset for pagination (can be passed directly or inside params)
If you are using this data source in the Datagrid component, it will send the offset automatically. You only need to implement the pagination on the store procedure side.
Usage Examples:
Example 1: With parameters and separate paginationEXEC GetUsers 'active', 'admin', 10, 0
Example 2: With pagination inside params
EXEC GetUsers 'active', 10, 0
Example 3: Only with limit and offset as separate parameters
EXEC GetAllUsers 20, 10
Example 4: Send params as a variable