adm_ai_qdrant_api
Package for interacting with Qdrant vector database Handles point creation, updates, and queries
r_collection_detail_type
Section titled “r_collection_detail_type”Type for collection detailed info
Definition:
type r_collection_detail_type is record ( status varchar2(100 char), optimizer_status varchar2(100 char), points_count number, segments_count number);Fields:
| Name | Type | Description |
|---|---|---|
status | varchar2(100 char) | - |
optimizer_status | varchar2(100 char) | - |
points_count | number | - |
segments_count | number | - |
Functions and Procedures
Section titled “Functions and Procedures”upsert_point
Section titled “upsert_point”Store a single vector point in Qdrant
Signature:
procedure upsert_point ( p_collection_name in varchar2, p_point_id in varchar2, p_vector in json_array_t, p_payload in json_object_t default null);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_collection_name | in | varchar2 | Name of the Qdrant collection |
p_point_id | in | varchar2 | Unique identifier for the point |
p_vector | in | json_array_t | JSON array containing the vector embeddings |
p_payload | in | json_object_t default null | Optional JSON object with metadata |
upsert_points
Section titled “upsert_points”Store multiple vector points in Qdrant in a single request
Signature:
procedure upsert_points ( p_collection_name in varchar2, p_points_array in json_array_t);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_collection_name | in | varchar2 | Name of the Qdrant collection |
p_points_array | in | json_array_t | JSON array of point objects (each with id, vector, and optional payload) |
delete_point
Section titled “delete_point”Delete a point from Qdrant
Signature:
procedure delete_point ( p_collection_name in varchar2, p_point_id in varchar2);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_collection_name | in | varchar2 | Name of the Qdrant collection |
p_point_id | in | varchar2 | ID of the point to delete |
search_similar
Section titled “search_similar”Search for similar vectors in Qdrant
Signature:
function search_similar ( p_collection_name in varchar2, p_vector in json_array_t, p_limit in number default 10, p_score_threshold in number default 0.5) return json_array_t;Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_collection_name | in | varchar2 | Name of the Qdrant collection |
p_vector | in | json_array_t | Query vector |
p_limit | in | number default 10 | Maximum number of results to return |
p_score_threshold | in | number default 0.5 | Minimum similarity score threshold |
Returns: json_array_t - JSON array of search results
scroll_all_point_ids
Section titled “scroll_all_point_ids”Scroll through all points in a Qdrant collection
Signature:
function scroll_all_point_ids ( p_collection_name in varchar2, p_limit in number default 100) return apex_t_varchar2;Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_collection_name | in | varchar2 | Name of the Qdrant collection |
p_limit | in | number default 100 | Number of points to retrieve per scroll request (default: 100) |
Returns: apex_t_varchar2 - JSON array of all point IDs in the collection
delete_points
Section titled “delete_points”Delete multiple points from Qdrant in a single request
Signature:
procedure delete_points ( p_collection_name in varchar2, p_point_ids in apex_t_varchar2);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_collection_name | in | varchar2 | Name of the Qdrant collection |
p_point_ids | in | apex_t_varchar2 | Array of point IDs to delete |
sync_with_db
Section titled “sync_with_db”Synchronize Qdrant collection with Oracle DB
- Removes points from Qdrant that don’t exist in adm_ai_rag_chunks
- Sets embedded_at to NULL for chunks in DB that don’t exist in Qdrant
Signature:
procedure sync_with_db ( p_rag_collection_id in number);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_rag_collection_id | in | number | ID of the RAG collection to sync |
get_all_collections
Section titled “get_all_collections”Get all collections from Qdrant
Signature:
function get_all_collections return t_collection_names pipelined;Returns: t_collection_names pipelined - Pipelined table of collection names
create_collection
Section titled “create_collection”Create a new collection in Qdrant
Signature:
procedure create_collection ( p_collection_name in varchar2, p_vector_size in number default 1024, p_distance in varchar2 default 'Cosine');Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_collection_name | in | varchar2 | Name for the new collection |
p_vector_size | in | number default 1024 | Size of the vector embeddings (default: 1024) |
p_distance | in | varchar2 default 'Cosine' | Distance metric for similarity (default: ‘Cosine’) |
get_collection_info
Section titled “get_collection_info”Get detailed information about a specific collection
Signature:
function get_collection_info ( p_collection_name in varchar2) return r_collection_detail_type;Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_collection_name | in | varchar2 | Name of the collection to query |
Returns: r_collection_detail_type - Collection statistics (status, optimizer_status, points_count, segments_count)
delete_collection
Section titled “delete_collection”Delete a collection from Qdrant
Signature:
procedure delete_collection ( p_collection_name in varchar2);Parameters:
| Name | Direction | Type | Description |
|---|---|---|---|
p_collection_name | in | varchar2 | Name of the collection to delete |