Interface MetadataStorageConfig

All Known Implementing Classes:
DefaultMetadataStorageConfig

public interface MetadataStorageConfig
Metadata configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    SQL definition of metadata field(s) list.
    Metadata Indexes, list of fields to use as index.
    Index Type: BTREE (default) GIN ...
    Metadata storage mode COMBINED_JSON: For dynamic metadata, when you don't know the list of metadata that will be used.
  • Method Details

    • storageMode

      MetadataStorageMode storageMode()
      Metadata storage mode
      • COMBINED_JSON: For dynamic metadata, when you don't know the list of metadata that will be used.
      • COMBINED_JSONB: Same as JSON, but stored in a binary way. Optimized for query on large dataset.
      • COLUMN_PER_KEY: for static metadata, when you know in advance the list of metadata
      Returns:
      Metadata storage mode
    • columnDefinitions

      List<String> columnDefinitions()
      SQL definition of metadata field(s) list. Example:
      • COMBINED_JSON: Collections.singletonList("metadata JSON NULL")
      • COMBINED_JSONB: Collections.singletonList("metadata JSONB NULL")
      • COLUMN_PER_KEY: Arrays.asList("condominium_id uuid null", "user uuid null")
      Returns:
      list of column definitions
    • indexes

      List<String> indexes()
      Metadata Indexes, list of fields to use as index. Example:
      • COMBINED_JSON: Collections.singletonList("metadata") or Arrays.asList("(metadata->'key')", "(metadata->'name')", "(metadata->'age')")
      • COMBINED_JSONB: Collections.singletonList("metadata") or Arrays.asList("(metadata->'key')", "(metadata->'name')", "(metadata->'age')")
      • COLUMN_PER_KEY: Arrays.asList("key", "name", "age")
      Returns:
      Metadata Indexes list
    • indexType

      String indexType()
      Index Type:
      • BTREE (default)
      • GIN
      • ... postgres indexes
      Returns:
      Index Type