Skip to main content

get_columns_for_stub

Function get_columns_for_stub 

Source
fn get_columns_for_stub(
    object_id: &ObjectId,
    stmt: Option<&Statement>,
    get_columns: &dyn Fn(&ObjectId) -> Option<BTreeMap<String, ColumnType>>,
) -> Result<BTreeMap<String, ColumnType>, CliError>
Expand description

Get column schemas for a stub table.

Tries, in order:

  1. Column lookup (types cache then types.lock)
  2. CREATE TABLE AST columns (if the statement is a CreateTable)