Database Interactions
Last updated
Last updated
Zephyr programs can interact with Mercury's database, enabling you to write, read, and update the data structures you define within it during execution. To access these data structures, simply define your tables in the Zephyr.toml
file (more practical information on this is available in the database interactions section).
Therefore, data will be indexed and stored in the database according to your specified logic, allowing you to query it from your client later on.
Once your data is indexed in the database tables, you have two options to query it:
Utilize our GraphQL API, which offers standardized queries and returns data in base64 XDR format.
Call a : these functions can be set up as custom API endpoints, and allow you to customize various aspects, including the response format.
By default, Zephyr tables can be shared across programs. Creators will have the ability to control access to their tables using custom rules. This feature enables any program or custom dashboard to access indexed and live-updated data on Mercury.