Changeset: e7d31fdeed12 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e7d31fdeed12 Modified Files: clients/odbc/driver/SQLGetTypeInfo.c Branch: linear-hashing Log Message:
Merge with Nov2019 branch. diffs (truncated from 1512 to 300 lines): diff --git a/clients/odbc/driver/SQLGetTypeInfo.c b/clients/odbc/driver/SQLGetTypeInfo.c --- a/clients/odbc/driver/SQLGetTypeInfo.c +++ b/clients/odbc/driver/SQLGetTypeInfo.c @@ -57,761 +57,824 @@ static const struct types { * Except for the type_name value, the string values are ready * to paste into an SQL query (i.e. including quotes). */ { - "uuid", /* type_name */ - SQL_GUID, /* data_type */ - 36, /* column_size */ - "NULL", /* literal_prefix */ - "NULL", /* literal_suffix */ - "NULL", /* create_params */ - SQL_NULLABLE, /* nullable */ - SQL_FALSE, /* case_sensitive */ - SQL_PRED_BASIC, /* searchable */ - -1, /* unsigned_attribute */ - SQL_FALSE, /* fixed_prec_scale */ - -1, /* auto_unique_value */ - "NULL", /* local_type_name */ - -1, /* minimum_scale */ - -1, /* maximum_scale */ - SQL_GUID, /* sql_data_type */ - -1, /* sql_datetime_sub */ - -1, /* num_prec_radix */ - -1, /* interval_precision */ + .type_name = "uuid", + .data_type = SQL_GUID, + .column_size = 36, + .literal_prefix = "NULL", + .literal_suffix = "NULL", + .create_params = "NULL", + .nullable = SQL_NULLABLE, + .case_sensitive = SQL_FALSE, + .searchable = SQL_PRED_BASIC, + .unsigned_attribute = -1, + .fixed_prec_scale = SQL_FALSE, + .auto_unique_value = -1, + .local_type_name = "NULL", + .minimum_scale = -1, + .maximum_scale = -1, + .sql_data_type = SQL_GUID, + .sql_datetime_sub = -1, + .num_prec_radix = -1, + .interval_precision = -1, }, { - "character large object", /* type_name */ - SQL_WLONGVARCHAR, /* data_type */ - 1000000, /* column_size */ - "''''", /* literal_prefix */ - "''''", /* literal_suffix */ - "NULL", /* create_params */ - SQL_NULLABLE, /* nullable */ - SQL_TRUE, /* case_sensitive */ - SQL_SEARCHABLE, /* searchable */ - -1, /* unsigned_attribute */ - SQL_FALSE, /* fixed_prec_scale */ - SQL_FALSE, /* auto_unique_value */ - "NULL", /* local_type_name */ - -1, /* minimum_scale */ - -1, /* maximum_scale */ - SQL_WLONGVARCHAR, /* sql_data_type */ - -1, /* sql_datetime_sub */ - -1, /* num_prec_radix */ - -1, /* interval_precision */ + .type_name = "character large object", + .data_type = SQL_WLONGVARCHAR, + .column_size = 1000000, + .literal_prefix = "''''", + .literal_suffix = "''''", + .create_params = "NULL", + .nullable = SQL_NULLABLE, + .case_sensitive = SQL_TRUE, + .searchable = SQL_SEARCHABLE, + .unsigned_attribute = -1, + .fixed_prec_scale = SQL_FALSE, + .auto_unique_value = SQL_FALSE, + .local_type_name = "NULL", + .minimum_scale = -1, + .maximum_scale = -1, + .sql_data_type = SQL_WLONGVARCHAR, + .sql_datetime_sub = -1, + .num_prec_radix = -1, + .interval_precision = -1, }, { - "varchar", /* type_name */ - SQL_WVARCHAR, /* data_type */ - 1000000, /* column_size */ - "''''", /* literal_prefix */ - "''''", /* literal_suffix */ - "'length'", /* create_params */ - SQL_NULLABLE, /* nullable */ - SQL_TRUE, /* case_sensitive */ - SQL_SEARCHABLE, /* searchable */ - -1, /* unsigned_attribute */ - SQL_FALSE, /* fixed_prec_scale */ - -1, /* auto_unique_value */ - "NULL", /* local_type_name */ - -1, /* minimum_scale */ - -1, /* maximum_scale */ - SQL_WVARCHAR, /* sql_data_type */ - -1, /* sql_datetime_sub */ - -1, /* num_prec_radix */ - -1, /* interval_precision */ + .type_name = "varchar", + .data_type = SQL_WVARCHAR, + .column_size = 1000000, + .literal_prefix = "''''", + .literal_suffix = "''''", + .create_params = "'length'", + .nullable = SQL_NULLABLE, + .case_sensitive = SQL_TRUE, + .searchable = SQL_SEARCHABLE, + .unsigned_attribute = -1, + .fixed_prec_scale = SQL_FALSE, + .auto_unique_value = -1, + .local_type_name = "NULL", + .minimum_scale = -1, + .maximum_scale = -1, + .sql_data_type = SQL_WVARCHAR, + .sql_datetime_sub = -1, + .num_prec_radix = -1, + .interval_precision = -1, }, { - "character", /* type_name */ - SQL_WCHAR, /* data_type */ - 1000000, /* column_size */ - "''''", /* literal_prefix */ - "''''", /* literal_suffix */ - "'length'", /* create_params */ - SQL_NULLABLE, /* nullable */ - SQL_TRUE, /* case_sensitive */ - SQL_SEARCHABLE, /* searchable */ - -1, /* unsigned_attribute */ - SQL_FALSE, /* fixed_prec_scale */ - SQL_FALSE, /* auto_unique_value */ - "NULL", /* local_type_name */ - -1, /* minimum_scale */ - -1, /* maximum_scale */ - SQL_WCHAR, /* sql_data_type */ - -1, /* sql_datetime_sub */ - -1, /* num_prec_radix */ - -1, /* interval_precision */ + .type_name = "character", + .data_type = SQL_WCHAR, + .column_size = 1000000, + .literal_prefix = "''''", + .literal_suffix = "''''", + .create_params = "'length'", + .nullable = SQL_NULLABLE, + .case_sensitive = SQL_TRUE, + .searchable = SQL_SEARCHABLE, + .unsigned_attribute = -1, + .fixed_prec_scale = SQL_FALSE, + .auto_unique_value = SQL_FALSE, + .local_type_name = "NULL", + .minimum_scale = -1, + .maximum_scale = -1, + .sql_data_type = SQL_WCHAR, + .sql_datetime_sub = -1, + .num_prec_radix = -1, + .interval_precision = -1, }, { - "char", /* type_name */ - SQL_WCHAR, /* data_type */ - 1000000, /* column_size */ - "''''", /* literal_prefix */ - "''''", /* literal_suffix */ - "'length'", /* create_params */ - SQL_NULLABLE, /* nullable */ - SQL_TRUE, /* case_sensitive */ - SQL_SEARCHABLE, /* searchable */ - -1, /* unsigned_attribute */ - SQL_FALSE, /* fixed_prec_scale */ - SQL_FALSE, /* auto_unique_value */ - "NULL", /* local_type_name */ - -1, /* minimum_scale */ - -1, /* maximum_scale */ - SQL_WCHAR, /* sql_data_type */ - -1, /* sql_datetime_sub */ - -1, /* num_prec_radix */ - -1, /* interval_precision */ + .type_name = "char", + .data_type = SQL_WCHAR, + .column_size = 1000000, + .literal_prefix = "''''", + .literal_suffix = "''''", + .create_params = "'length'", + .nullable = SQL_NULLABLE, + .case_sensitive = SQL_TRUE, + .searchable = SQL_SEARCHABLE, + .unsigned_attribute = -1, + .fixed_prec_scale = SQL_FALSE, + .auto_unique_value = SQL_FALSE, + .local_type_name = "NULL", + .minimum_scale = -1, + .maximum_scale = -1, + .sql_data_type = SQL_WCHAR, + .sql_datetime_sub = -1, + .num_prec_radix = -1, + .interval_precision = -1, }, { - "boolean", /* type_name */ - SQL_BIT, /* data_type */ - 1, /* column_size */ - "NULL", /* literal_prefix */ - "NULL", /* literal_suffix */ - "NULL", /* create_params */ - SQL_NULLABLE, /* nullable */ - SQL_FALSE, /* case_sensitive */ - SQL_PRED_BASIC, /* searchable */ - SQL_FALSE, /* unsigned_attribute */ - SQL_TRUE, /* fixed_prec_scale */ - SQL_FALSE, /* auto_unique_value */ - "NULL", /* local_type_name */ - -1, /* minimum_scale */ - -1, /* maximum_scale */ - SQL_BIT, /* sql_data_type */ - -1, /* sql_datetime_sub */ - -1, /* num_prec_radix */ - -1, /* interval_precision */ + .type_name = "boolean", + .data_type = SQL_BIT, + .column_size = 1, + .literal_prefix = "NULL", + .literal_suffix = "NULL", + .create_params = "NULL", + .nullable = SQL_NULLABLE, + .case_sensitive = SQL_FALSE, + .searchable = SQL_PRED_BASIC, + .unsigned_attribute = SQL_FALSE, + .fixed_prec_scale = SQL_TRUE, + .auto_unique_value = SQL_FALSE, + .local_type_name = "NULL", + .minimum_scale = -1, + .maximum_scale = -1, + .sql_data_type = SQL_BIT, + .sql_datetime_sub = -1, + .num_prec_radix = -1, + .interval_precision = -1, }, { - "tinyint", /* type_name */ - SQL_TINYINT, /* data_type */ - 2, /* column_size */ - "NULL", /* literal_prefix */ - "NULL", /* literal_suffix */ - "'precision'", /* create_params */ - SQL_NULLABLE, /* nullable */ - SQL_FALSE, /* case_sensitive */ - SQL_PRED_BASIC, /* searchable */ - SQL_FALSE, /* unsigned_attribute */ - SQL_FALSE, /* fixed_prec_scale */ - SQL_FALSE, /* auto_unique_value */ - "NULL", /* local_type_name */ - 0, /* minimum_scale */ - 0, /* maximum_scale */ - SQL_TINYINT, /* sql_data_type */ - -1, /* sql_datetime_sub */ - 10, /* num_prec_radix */ - -1, /* interval_precision */ + .type_name = "tinyint", + .data_type = SQL_TINYINT, + .column_size = 2, + .literal_prefix = "NULL", + .literal_suffix = "NULL", + .create_params = "'precision'", + .nullable = SQL_NULLABLE, + .case_sensitive = SQL_FALSE, + .searchable = SQL_PRED_BASIC, + .unsigned_attribute = SQL_FALSE, + .fixed_prec_scale = SQL_FALSE, + .auto_unique_value = SQL_FALSE, + .local_type_name = "NULL", + .minimum_scale = 0, + .maximum_scale = 0, + .sql_data_type = SQL_TINYINT, + .sql_datetime_sub = -1, + .num_prec_radix = 10, + .interval_precision = -1, }, { - "bigint", /* type_name */ - SQL_BIGINT, /* data_type */ - 19, /* column_size */ - "NULL", /* literal_prefix */ - "NULL", /* literal_suffix */ - "'precision'", /* create_params */ - SQL_NULLABLE, /* nullable */ - SQL_FALSE, /* case_sensitive */ - SQL_PRED_BASIC, /* searchable */ - SQL_FALSE, /* unsigned_attribute */ - SQL_FALSE, /* fixed_prec_scale */ - SQL_FALSE, /* auto_unique_value */ - "NULL", /* local_type_name */ _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list