| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- // v2.15.0 - the feature names this server reports in GetServerInfo.
- //
- // A client gates a feature on its NAME, never on a version number, so a
- // backported or patched server can say exactly what it supports. Rules:
- // - a name is never removed while the feature exists, and never reused;
- // - a feature whose meaning changes gets a NEW name (the old one goes when the
- // old meaning goes);
- // - the client keeps the same names in client.hpp (Client::Capability) - add a
- // name to both in the same change.
- // Features from before 2.15.0 are listed so the answer is complete; a client
- // talking to a pre-2.15.0 server gets UNIMPLEMENTED and must assume none of the
- // names introduced in 2.15.0 or later.
- #pragma once
- #include <array>
- #include <string_view>
- namespace smartbotic::database {
- inline constexpr std::array<std::string_view, 26> kServerCapabilities = {
- "projects", // 2.3.0 <project>:<collection> namespaces
- "access_policy", // 2.7.0 row/column security
- "query_projection", // 2.7.1 FindRequest.projection
- "file_ttl", // 2.8.0 file expiry, SetFileTtl
- "document_ttl_update", // 2.8.0 ttl_seconds on Update/PatchDocument
- "secondary_indexes", // 2.9.0 CreateIndex/DropIndex/ListIndexes
- "index_values", // 2.10.0 GetIndexValues
- "relations", // 2.11.0 referential integrity, DescribeDelete
- "unique_indexes", // 2.11.0 enforced unique constraints
- "error_detail", // 2.12.0 sbdb-error-detail-bin trailer, in-band codes
- "patch_if_version", // 2.12.0 PatchDocumentRequest.expected_version
- "increment", // 2.12.0 PatchDocumentRequest.increments_json
- "composite_unique", // 2.12.0 multi-field unique constraints
- "batch_delete_ids", // 2.12.0 BatchDeleteResponse.deleted_ids
- "event_actor", // 2.12.0 actor on DatabaseEvent / Delete
- "vector_readback", // 2.13.0 include_vector on Get/Find
- "export_collection", // 2.13.0 ExportCollection stream
- "write_size_guard", // 2.13.1 document_too_large refusals
- "filtered_similarity", // 2.14.0 SimilaritySearchRequest.filters
- "server_info", // 2.15.0 GetServerInfo itself
- "client_version_header", // 2.15.0 the server reads sbdb-client-version
- "collection_schema", // 2.16.0 Set/Get/SuggestCollectionSchema, schema_violation
- "encryption_at_rest", // 2.17.0 encrypted collections encrypt, VerifyEncryption, encrypted_field
- "typed_range_filters", // 2.18.0 GT/GTE/LT/LTE match number~number and string~string only
- "document_expires_at", // 2.19.0 _expires_at filterable; reserved in write bodies
- "re2_regex_filters", // 2.20.0 REGEX filters use RE2 (UTF-8, linear); invalid_pattern refusals
- };
- } // namespace smartbotic::database
|