tokio-rs / rdbc

Rust DataBase Connectivity (RDBC) :: Common Rust API for database drivers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Datatype for 64-bit integers (long long)?

golddranks opened this issue · comments

Hi, there is DataType::Integer. I was wondering if it's meant to signify 32-bit integers, (int in MySQL and integer in Postgres). Is there a plan for having a data type for 64-bit integers?

It would also be very helpful if there were a correspondence table between the data types of this library, standard SQL and commonly used DB's such as Postgres, MySQL and Sqlite.

Note: this is not because it would be impossible to get 64-bit integers from the database at the moment; get_i64 seems to work just fine. However, it's because when dealing with databases with unknown schemas, we want to be able to inspect the metadata to know the correct numeric ranges that might be stored in the DB.

Yes, good point. I was just roughing out the DataTypes enum to get some basic tests working. I really want to study both the ODBC and JDBC specifications and learn from how they both modeled the data types.