res://addons/w4gd/supabase/pg_meta.gd

Inherits: res://addons/w4gd/supabase/endpoint.gd < RefCounted

The Supabase pgmeta end-point at /pg.

Description

This end-point is only enabled during development. It is disabled on production workspaces for security.

Methods

void

alter_table ( String id, Variant name, Variant schema, Variant primary_keys, Variant rls_enabled, Variant rls_forced, Variant replica_identity_index, Variant comment )

void

create_column ( String table_id, String name, String type, Variant default_value, Variant default_value_format, Variant is_nullable, Variant is_primary_key, Variant is_unique, Variant check, Variant is_identity, bool identity_generation, Variant comment )

void

create_table ( String name, String schema, Variant comment )

void

delete_column ( String column_id )

void

delete_table ( String id, bool cascade )

void

get_column ( String column_id )

void

get_columns ( bool include_system_schemas, int limit, int offset )

void

get_table ( String id )

void

get_tables ( bool include_system_schemas, int limit, int offset )

void

query ( String p_query )

void

sql_identifier ( String p_name )

void

sql_string ( String p_string )

void

update_column ( String column_id, Variant name, Variant type, Variant drop_default, Variant default_value, Variant default_value_format, Variant is_nullable, Variant is_unique, Variant is_identity, bool identity_generation, Variant comment )


Method Descriptions

void alter_table ( String id, Variant name, Variant schema, Variant primary_keys, Variant rls_enabled, Variant rls_forced, Variant replica_identity_index, Variant comment )

Alters the given table.


void create_column ( String table_id, String name, String type, Variant default_value, Variant default_value_format, Variant is_nullable, Variant is_primary_key, Variant is_unique, Variant check, Variant is_identity, bool identity_generation, Variant comment )

Creates a column.


void create_table ( String name, String schema, Variant comment )

Creates a new table.


void delete_column ( String column_id )

Deletes the given column.


void delete_table ( String id, bool cascade )

Deletes the given table.


void get_column ( String column_id )

Gets the given column.


void get_columns ( bool include_system_schemas, int limit, int offset )

Gets all columns.


void get_table ( String id )

Gets the given table.


void get_tables ( bool include_system_schemas, int limit, int offset )

Gets a list of all the tables in the database.


void query ( String p_query )

Runs the given SQL query.


void sql_identifier ( String p_name )

Returns an escaped SQL identifier.


void sql_string ( String p_string )

Returns an escaped SQL string.


void update_column ( String column_id, Variant name, Variant type, Variant drop_default, Variant default_value, Variant default_value_format, Variant is_nullable, Variant is_unique, Variant is_identity, bool identity_generation, Variant comment )

Updates the given column.