Allow clients to opt-in to handling long-comment tables by using a SHOW TABLES query. The fetch_all function is using a bound 'remarks' column that is configured to have a max_length of 254 characters. That max length is not configurable and the column cannot be unbound. So when a table with a comment longer than 254 characters exists in the result set, we run into the negative string size (or size too big) error.
This change uses a show tables query which generates a comment column definition with the max length allowed in snowflake. This allows us to pull down tables with any size comment. Since the result set is different between the show tables query and the fetch_all function on the tables ODBC:Statement object, the application must opt-in to using this functionality by defining silo_fetch_all_tables in the database.yml file (see below).
Allow clients to opt-in to handling long-comment tables by using a
SHOW TABLES
query. Thefetch_all
function is using a bound 'remarks' column that is configured to have a max_length of 254 characters. That max length is not configurable and the column cannot be unbound. So when a table with a comment longer than 254 characters exists in the result set, we run into thenegative string size (or size too big)
error.This change uses a
show tables
query which generates a comment column definition with the max length allowed in snowflake. This allows us to pull down tables with any size comment. Since the result set is different between theshow tables
query and thefetch_all
function on the tables ODBC:Statement object, the application must opt-in to using this functionality by definingsilo_fetch_all_tables
in the database.yml file (see below).