parrot

Types

pub type Engine {
  SQlite
  MySQL
  PostgreSQL
}

Constructors

  • SQlite
  • MySQL
  • PostgreSQL
pub type ParrotError {
  UnknownEngine(String)
  SqlitDBNotFound(String)
  MySqlDBNotFound(String)
  PostgreSqlDBNotFound(String)
  NoQueriesFound
  MysqldumpError
  PgdumpError
}

Constructors

  • UnknownEngine(String)
  • SqlitDBNotFound(String)
  • MySqlDBNotFound(String)
  • PostgreSqlDBNotFound(String)
  • NoQueriesFound
  • MysqldumpError
  • PgdumpError

Values

pub fn cmd_gen(
  engine: Engine,
  db: String,
) -> Result(Nil, ParrotError)
pub fn engine_to_sqlc_string(engine: Engine) -> String
pub fn err_to_string(error: ParrotError) -> String
pub fn fetch_schema_mysql(
  db: String,
) -> Result(String, ParrotError)
pub fn fetch_schema_postgresql(
  db: String,
) -> Result(String, ParrotError)
pub fn fetch_schema_sqlite(
  db: String,
) -> Result(List(String), ParrotError)
pub fn gen_sqlc_yaml(
  engine: Engine,
  queries: List(String),
) -> String
pub fn main() -> Result(Nil, String)
pub fn walk(from: String) -> Dict(String, List(String))

Finds all from/**/sql directories and lists the full paths of the *.sql files inside each one. https://github.com/giacomocavalieri/squirrel/blob/main/src/squirrel.gleam

Search Document