Storage Engine
Nakama incorporates a storage engine for project-specific data, such as user accounts. The storage engine design is optimized for object ownership, access permissions, and batch operations. Data is stored in collections with one or more objects which contain a unique key with JSON content.
Some best practices to keep in mind:
- JSONB queries can be used, contact Heroic Labs for support writing your JSONB queries, if needed.
- Writing custom SQL is discouraged in favor of using the built-in features of the Storage Engine. If custom SQL is needed for your use case, please contact Heroic Labs before proceeding.
- The creation of custom tables is strongly discouraged.
A storage write can be rejected, and both cases return the same gRPC InvalidArgument (HTTP 400) response: a conditional write
whose version check fails, or a write the caller doesn’t have permission to make. For how to tell the two apart and what to do next, see Storage version rejection
.
