Documentation
¶
Index ¶
Constants ¶
View Source
const ( // SNOWFLAKE_TABLES_LIST_QUERY is the query to list tables in Snowflake. SNOWFLAKE_TABLES_LIST_QUERY = "SELECT table_name FROM %s.information_schema.tables WHERE table_schema = '%s';" // SNOWFLAKE_SCHEMA_QUERY is the query to retrieve schema information for a table in Snowflake. SNOWFLAKE_SCHEMA_QUERY = "SELECT column_name::TEXT, data_type::TEXT FROM information_schema.columns WHERE table_name::TEXT = ?;" )
Variables ¶
View Source
var DB_PASSWORD string = "DB_PASSWORD"
DB_PASSWORD is the environment variable name for the database password.
Functions ¶
func NewSnowflake ¶
NewSnowflake creates a new Snowflake object with an initialized database client and configuration.
Types ¶
type Snowflake ¶
type Snowflake struct { Client *sql.DB // Client is the database client for Snowflake. Config *config.Config // Config is the configuration for Snowflake. }
Snowflake is a Snowflake implementation of the ISQL interface.
func (*Snowflake) Execute ¶
Execute executes a query on a Snowflake database and returns the result as a JSON byte slice.
func (*Snowflake) GenerateCreateTableQuery ¶
GenerateCreateTableQuery generates a CREATE TABLE query for Snowflake. It takes a Table struct as an argument and returns the query as a string.
Click to show internal directories.
Click to hide internal directories.