Managed schemaless SQL-capable database to store your entities
Using a database is optional, but if you need one, Flair provides a managed database with easy functions for you to upsert (add or update) or retrieve data in your custom processors, or your backend and frontend.


A namespace groups all your entities, you can think of a namespace as a "database instance".
You can create one or more namespaces (for versioning purposes, or separating dev and prod environments, etc) for your project.
When you follow Getting Started guide you will define your own namespace in the manifest.yml

Writing to or Query the database

Please refer to Global Variables > database section to learn how to write data to or read from your namespace from custom scripts, or your backend and frontend.
You don't need to define any schema in Flair, all your entities are stored in a schemaless database, while still allowing you to execute real-time fast SQL queries on your entities.
This means simply just "upsert" a new entity and that's it.

Your own database

Custom processors can deliver the data right to your database, this can give you more flexibility or performance depending on the use-case.
We recommend to use Flair's managed database integration which is optimized for blockchain indexing to handle scenarios such as re-orgs and also allows you to run scheduled aggregations easily.
To sync the data to any destination, we help you use flow (from Estuary) which is an open-source solution to sync databases in real-time. Flow will basically sync the data stored in Flair's database towards your database (that means inserts, updates, reorg reconciliations, etc). For a full list of supported destinations, check here.
If you need help writing a custom processor for this purpose, reach out to our engineers 🙂
Last modified 27d ago