Database
The Q2 database is the primary method of storage for data to be remembered between sessions. You have full access to the database during development, on your stack, and can run SQL queries against it. For security, this is not possible after deployment to the Q2 datacenter. We provide two alternatives:
- Database Objects
Programmatic access from Python. Much like an ORM, though not as full-featured. These objects are simple for the Caliper team to create, and are a safe and clean way to interact with the database. We build new database objects, or “DbObjects”, all the time, and are open to suggestions for additional ones or improvements.
- Preregistered SQL
We never execute raw SQL queries at runtime in the Caliper SDK. Instead, we call stored procedures that are registered with the raw SQL through HQ’s ExecuteStoredProcedure module. It is also possible to run one-time queries for setting up tables and schema. More on this in our Custom SQL section.
- Related Concepts: