MCPcopy Create free account
hub / github.com/douglance/devsql / create_index

Method create_index

crates/ccql/src/sql/composite_storage.rs:669–684  ·  view source on GitHub ↗
(
        &mut self,
        table_name: &str,
        index_name: &str,
        column: &OrderByExpr,
    )

Source from the content-addressed store, hash-verified

667#[async_trait]
668impl IndexMut for CompositeStorage {
669 async fn create_index(
670 &mut self,
671 table_name: &str,
672 index_name: &str,
673 column: &OrderByExpr,
674 ) -> Result<()> {
675 if self.is_virtual_table(table_name) {
676 Err(GlueError::StorageMsg(
677 "Cannot create index on virtual table".to_string(),
678 ))
679 } else {
680 self.json_storage
681 .create_index(table_name, index_name, column)
682 .await
683 }
684 }
685
686 async fn drop_index(&mut self, table_name: &str, index_name: &str) -> Result<()> {
687 if self.is_virtual_table(table_name) {

Callers

nothing calls this directly

Calls 1

is_virtual_tableMethod · 0.80

Tested by

no test coverage detected