Skip to content

Commit 9649fe3

Browse files
committed
docs: fix _virtual table description
1 parent 0e36b7b commit 9649fe3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ func _ready():
161161
db.calibrate_embedding_size()
162162
```
163163

164-
5. Create tables based on the metadata, By default, 3 table are created:
164+
5. Create tables based on the metadata, By default, these table are created:
165165

166166
* `llm_table_meta`: which store the metadata for a particular id
167167
* `llm_table`: store texts with metadata and embedding
168-
* `llm_table_virtual`: a table for embedding similarity computation
168+
* Some tables with names containing `llm_table_virtual`: tables for embedding similarity computation
169169

170170
Note that your `.meta` property should always match the metadata columns in the database before any storing or retrieving operation, consider setting your `.meta` property within the `_ready()` function or within the inspector.
171171

@@ -398,9 +398,9 @@ Besides the functions and signals from GDEmbedding, LlmDB has a few more functio
398398
* `open_db()`: create a `dB_File` at `dB_Dir` if the file doesn't exist, then connect to the database
399399
* `close_db()`: terminate the connection to the database
400400
* `execute(statement: String)` execute an sql statement, turn on `Verbose stdout` in `Project Settings` to see the log generated by this statement
401-
* `create_llm_tables()`: create a table with name `Table Name` if the table doesn't exist, and two addtional `Table Name` + `_meta` and `Table Name` + `_virtual` tables
401+
* `create_llm_tables()`: create a table with name `Table Name` if the table doesn't exist, a `Table Name` + `_meta` table to store pre-defined metadata by `id`, and some `_virtual` tables to
402402
* `drop_table(p_table_name: String)`: drop a table with a specific name
403-
* `drop_llm_tables(p_table_name: String)`: drop all three tables created by `create_llm_tables()`, where `p_table_name` is the `Table Name` when the creation function is called
403+
* `drop_llm_tables(p_table_name: String)`: drop all tables (except the `sqlite_sequence` table which is created automatically for autoincrement) created by `create_llm_tables()`, i.e., `p_table_name`, `p_table_name` + `_meta` and every table with a name containing `p_table_name` + `_virtual`
404404
* `has_table(p_table_name: String) -> bool`: whether a table with this name exists
405405
* `is_table_valid(p_table_name: String) -> bool`: whether the table contains valid metadata, i.e., all elements in `.meta` properties exist in the table and the data types are correct
406406
* `store_meta(meta_dict: Dictionary)`: store a set of meta data to table `Table Name` + `_meta` with `id` as the primary key, such that you can call `store_text_by_id` by id instead of inputting the full metadata dictionary through `store_text_by_meta`

0 commit comments

Comments
 (0)