Supabase.PostgREST.Parser (supabase_postgrest v1.2.2)
View Sourcesimple parser for create statements on postgresql
Summary
Types
@type ast() :: [table() | rls_policy()]
@type column() :: {name :: String.t(), attrs :: [column_def()]}
@type column_def() :: {:type, String.t()} | {:primary, boolean()} | {:null, boolean()} | {:references, table_name()} | {:default, String.t()}
@type rls_option() :: {:type, :permissive | :restricted} | {:on, table_name()} | {:for, :all | :insert | :update | :delete | :select} | {:role, String.t()} | {:using, String.t()} | {:with_check, String.t()}
@type rls_policy() :: {name :: String.t(), rls_config :: [rls_option()]}
@type table() :: {table_name(), columns :: [column()]}