@@ -41,24 +41,43 @@ use crate::sql::{CommandGetXdbcTypeInfo, Nullable, Searchable, XdbcDataType, Xdb
4141/// Data structure representing type information for xdbc types.
4242#[ derive( Debug , Clone , Default ) ]
4343pub struct XdbcTypeInfo {
44+ /// The name of the type
4445 pub type_name : String ,
46+ /// The data type of the type
4547 pub data_type : XdbcDataType ,
48+ /// The column size of the type
4649 pub column_size : Option < i32 > ,
50+ /// The prefix of the type
4751 pub literal_prefix : Option < String > ,
52+ /// The suffix of the type
4853 pub literal_suffix : Option < String > ,
54+ /// The create parameters of the type
4955 pub create_params : Option < Vec < String > > ,
56+ /// The nullability of the type
5057 pub nullable : Nullable ,
58+ /// Whether the type is case sensitive
5159 pub case_sensitive : bool ,
60+ /// Whether the type is searchable
5261 pub searchable : Searchable ,
62+ /// Whether the type is unsigned
5363 pub unsigned_attribute : Option < bool > ,
64+ /// Whether the type has fixed precision and scale
5465 pub fixed_prec_scale : bool ,
66+ /// Whether the type is auto-incrementing
5567 pub auto_increment : Option < bool > ,
68+ /// The local type name of the type
5669 pub local_type_name : Option < String > ,
70+ /// The minimum scale of the type
5771 pub minimum_scale : Option < i32 > ,
72+ /// The maximum scale of the type
5873 pub maximum_scale : Option < i32 > ,
74+ /// The SQL data type of the type
5975 pub sql_data_type : XdbcDataType ,
76+ /// The optional datetime subcode of the type
6077 pub datetime_subcode : Option < XdbcDatetimeSubcode > ,
78+ /// The number precision radix of the type
6179 pub num_prec_radix : Option < i32 > ,
80+ /// The interval precision of the type
6281 pub interval_precision : Option < i32 > ,
6382}
6483
@@ -93,16 +112,6 @@ impl XdbcTypeInfoData {
93112 }
94113}
95114
96- pub struct XdbcTypeInfoDataBuilder {
97- infos : Vec < XdbcTypeInfo > ,
98- }
99-
100- impl Default for XdbcTypeInfoDataBuilder {
101- fn default ( ) -> Self {
102- Self :: new ( )
103- }
104- }
105-
106115/// A builder for [`XdbcTypeInfoData`] which is used to create [`CommandGetXdbcTypeInfo`] responses.
107116///
108117/// # Example
@@ -138,6 +147,16 @@ impl Default for XdbcTypeInfoDataBuilder {
138147/// // to access the underlying record batch
139148/// let batch = info_list.record_batch(None);
140149/// ```
150+ pub struct XdbcTypeInfoDataBuilder {
151+ infos : Vec < XdbcTypeInfo > ,
152+ }
153+
154+ impl Default for XdbcTypeInfoDataBuilder {
155+ fn default ( ) -> Self {
156+ Self :: new ( )
157+ }
158+ }
159+
141160impl XdbcTypeInfoDataBuilder {
142161 /// Create a new instance of [`XdbcTypeInfoDataBuilder`].
143162 pub fn new ( ) -> Self {
0 commit comments