sqlode/generate

Types

pub type GenerateError {
  ConfigError(config.ConfigError)
  SchemaReadError(path: String, detail: String)
  SchemaParseError(detail: String)
  QueryReadError(path: String, detail: String)
  QueryParseError(path: String, detail: String)
  QueryAnalysisError(detail: String)
  NoQueriesGenerated(
    output: String,
    parsed_query_count: Int,
    schema_table_count: Int,
    query_paths: List(String),
    schema_paths: List(String),
  )
  DuplicateQueryName(name: String, paths: List(String))
  NormalizedQueryNameCollision(
    function_name: String,
    names: List(String),
    paths: List(String),
  )
  UnsupportedAnnotation(
    query_name: String,
    command: String,
    detail: String,
  )
  InvalidOutPath(path: String)
  WriteError(writer.WriteError)
  VendorRuntimeNotFound
  UnsupportedArrayForEngine(query_name: String, engine: String)
}

Constructors

  • ConfigError(config.ConfigError)
  • SchemaReadError(path: String, detail: String)
  • SchemaParseError(detail: String)
  • QueryReadError(path: String, detail: String)
  • QueryParseError(path: String, detail: String)
  • QueryAnalysisError(detail: String)
  • NoQueriesGenerated(
      output: String,
      parsed_query_count: Int,
      schema_table_count: Int,
      query_paths: List(String),
      schema_paths: List(String),
    )
  • DuplicateQueryName(name: String, paths: List(String))
  • NormalizedQueryNameCollision(
      function_name: String,
      names: List(String),
      paths: List(String),
    )
  • UnsupportedAnnotation(
      query_name: String,
      command: String,
      detail: String,
    )
  • InvalidOutPath(path: String)
  • WriteError(writer.WriteError)
  • VendorRuntimeNotFound
  • UnsupportedArrayForEngine(query_name: String, engine: String)

Values

pub fn apply_column_renames(
  queries: List(model.AnalyzedQuery),
  renames: List(model.ColumnRename),
) -> List(model.AnalyzedQuery)
pub fn error_to_string(error: GenerateError) -> String
pub fn generate_config(
  cfg: model.Config,
) -> Result(List(String), GenerateError)
pub fn run(
  config_path: String,
) -> Result(List(String), GenerateError)
Search Document