-module(glsql@internal@ast). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]). -define(FILEPATH, "src/glsql/internal/ast.gleam"). -export_type([schema_ast/0, table/0, column/0, sql_type/0, column_constraint/0, table_constraint/0]). -if(?OTP_RELEASE >= 27). -define(MODULEDOC(Str), -moduledoc(Str)). -define(DOC(Str), -doc(Str)). -else. -define(MODULEDOC(Str), -compile([])). -define(DOC(Str), -compile([])). -endif. ?MODULEDOC(false). -type schema_ast() :: {schema_ast, list(table())}. -type table() :: {table, binary(), gleam@option:option(binary()), list(column()), list(table_constraint()), integer()}. -type column() :: {column, binary(), sql_type(), list(column_constraint()), integer()}. -type sql_type() :: {sql_type, binary(), list(binary()), integer(), integer()}. -type column_constraint() :: {not_null, integer()} | {nullable, integer()} | {primary_key, integer()} | {unique, integer()} | {default, binary(), integer()} | {references, binary(), list(binary()), integer()} | {check, binary(), integer()}. -type table_constraint() :: {table_primary_key, list(binary()), integer()} | {table_unique, list(binary()), integer()} | {table_foreign_key, list(binary()), binary(), list(binary()), integer()} | {table_check, binary(), integer()}.