orcalib#
CatchupStatus
#
Index status enum. Used to check the status of a catchup operation.
Attributes:
-
IN_PROGRESS
–Index is still catching up
-
COMPLETED
–Index has caught up
-
FAILED
–Catchup operation failed
-
CANCELLED
–Catchup operation was cancelled
-
CANCELLING
–Catchup operation is in the process of being cancelled
ImageFormat
#
Order
#
TableCreateMode
#
set_orca_credentials
#
Set the credentials for the Orca client. This must be called before any other Orca functions. This can also be called multiple times to change the credentials.
Parameters:
-
api_key
(str | None
) –API key
-
secret_key
(str | None
) –Secret key
-
endpoint
(str | None
, default:None
) –Endpoint (optional)
Examples:
check_orca_version_compatibility
#
Check if the OrcaLib version is compatible with the OrcaDB instance version and log a warning if not.
Returns:
-
bool | None
–True if the versions match, False if they do not, None if the version check is skipped
Examples:
create_table
#
Create a table in the default database. This is a convenience function that calls create_table
on the default db.
Parameters:
-
table_name
(str
) –Name of the table
-
if_table_exists
(TableCreateMode
, default:ERROR_IF_TABLE_EXISTS
) –What to do if the table already exists
-
**columns
(OrcaTypeHandle
, default:{}
) –Columns of the table (name -> type mapping)
Returns:
-
TableHandle
–TableHandle
Examples:
get_table
#
Get a table from the default database. This is a convenience function that calls get_table
on the default db.
Parameters:
-
table_name
(str
) –Name of the table
Returns:
-
TableHandle
–TableHandle
Examples:
list_tables
#
backup
#
get_index
#
Get an index from the default database. This is a convenience function that calls get_index
on the default db.
Parameters:
-
index_name
(str
) –Name of the index
Returns:
-
IndexHandle
–IndexHandle
Examples:
create_vector_index
#
Create a vector index for default db. This is a convenience function that calls create_vector_index
on the default db.
Parameters:
create_document_index
#
Create a document index for default db. This is a convenience function that calls create_document_index
on the default db.
Parameters:
-
index_name
(str
) –Name of the index
-
table_name
(str
) –Name of the table
-
column
(str
) –Name of the column
-
error_if_exists
(bool
, default:True
) –Whether to raise an error if the index already exists (default: True)
Examples:
create_text_index
#
Create a text index for default db. This is a convenience function that calls create_text_index
on the default db.
Parameters:
-
index_name
(str
) –Name of the index
-
table_name
(str
) –Name of the table
-
column
(str
) –Name of the column
-
error_if_exists
(bool
, default:True
) –Whether to raise an error if the index already exists (default: True)
Examples:
create_btree_index
#
Create a btree index for default db. This is a convenience function that calls create_btree_index
on the default db.
Parameters:
-
index_name
(str
) –Name of the index
-
table_name
(str
) –Name of the table
-
column
(str
) –Name of the column
-
error_if_exists
(bool
, default:True
) –Whether to raise an error if the index already exists
Examples:
drop_index
#
drop_table
#
search_memory
#
scan_index
#
Scan an index for default db. This is a convenience function that calls scan_index
on the default db.
Parameters:
Returns:
-
DefaultIndexQuery
–DefaultIndexQuery
Examples:
vector_scan_index
#
Scan a vector index for default db. This is a convenience function that calls vector_scan_index
on the default db.
Parameters:
Returns:
-
VectorIndexQuery
–VectorIndexQuery
Examples:
full_vector_memory_join
#
Join a vector index with a memory index for default db. This is a convenience function that calls full_vector_memory_join
on the default db.
Parameters:
-
index_name
(str
) –Name of the index
-
memory_index_name
(str
) –Name of the memory index
-
num_memories
(int
) –Number of memories
-
query_columns
(list[str]
) –Query columns
-
page_index
(int
) –Page index
-
page_size
(int
) –Page size
Returns:
Examples: