Class EmbeddingTable

java.lang.Object
dev.langchain4j.store.embedding.oracle.EmbeddingTable

public final class EmbeddingTable extends Object

Represents a database table where embeddings, text, and metadata are stored. The columns of this table are listed below.

Table Columns
Name Type Description
id VARCHAR(36) Primary key. Used to store UUID strings which are generated by OracleEmbeddingStore.add(Embedding), OracleEmbeddingStore.add(Embedding, TextSegment), OracleEmbeddingStore.addAll(List), and OracleEmbeddingStore.add(Embedding, TextSegment)
embedding VECTOR(*, FLOAT32) Stores the Embedding.vector() passed to OracleEmbeddingStore.add(Embedding), OracleEmbeddingStore.add(Embedding, TextSegment), OracleEmbeddingStore.addAll(List), and OracleEmbeddingStore.add(Embedding, TextSegment). Never stores NULL.
text CLOB Stores the TextSegment.text() passed to OracleEmbeddingStore.add(Embedding, TextSegment) and EmbeddingStore.addAll(List, List). Stores NULL when OracleEmbeddingStore.add(Embedding) and OracleEmbeddingStore.addAll(List) are called.
metadata JSON Stores the TextSegment.metadata() passed to OracleEmbeddingStore.add(Embedding, TextSegment) and EmbeddingStore.addAll(List, List). Stores NULL when OracleEmbeddingStore.add(Embedding) and OracleEmbeddingStore.addAll(List) are called.

The column names listed above are used by default, but alternative names may be configured using EmbeddingTable.Builder methods.

  • Method Details

    • name

      public String name()
      Returns the name of this table.
      Returns:
      The name of this table. Not null.
    • idColumn

      public String idColumn()
      Returns the name of this table's ID column.
      Returns:
      The name of this table's ID column. Not null.
    • embeddingColumn

      public String embeddingColumn()
      Returns the name of this table's embedding column.
      Returns:
      The name of this table's embedding column. Not null.
    • textColumn

      public String textColumn()
      Returns the name of this table's text column.
      Returns:
      The name of this table's text column. Not null.
    • metadataColumn

      public String metadataColumn()
      Returns the name of this table's metadata column.
      Returns:
      The name of this table's text column. Not null.
    • builder

      public static EmbeddingTable.Builder builder()
      Returns a builder that configures a new EmbeddingTable.
      Returns:
      An EmbeddingTable builder. Not null.