Comments (7)
I've very much for this! When I first created the time
and timestamp
structs I didn't have a good use-case for them because I personally was not actually using them in my code. So I have never felt entirely confident that the structures as-is are sufficient for the needs of others. I'm quite sure that timezone, at the very least, will be a very useful addition.
from nanodbc.
From @mloskot on November 16, 2016 17:33
I'm glad.
My main use case is around SQL Server, but hopefully those changes will allow to cover PostgreSQL too, and others if necessary.
By the way, despite SQL Server Native Client (SNAC, SQLNCLI.H) is not supported beyond SQL Server 2012, the new Microsoft ODBC Driver for SQL Server still reports TIME
and DATETIMEOFFSET
SQL types using constants as defined in SQLNCLI.h
as explained in Data Type Support for ODBC Date and Time Improvements
Time SQL_SS_TIME2 -154 (SQLNCLI.h)
DatetimeOFFSET SQL_SS_TIMESTAMPOFFSET -155 (SQLNCLI.h)
It's a bit of a mess, but we may need to accommodate some changes for SQL_SS_TIME2
and SQL_SS_TIMESTAMPOFFSET
too. I'm going to check what constants report pgsqlODBC and others which support similar types.
from nanodbc.
From @mloskot on November 21, 2016 10:18
My last https://github.com/lexicalunit/nanodbc/issues/224#issuecomment-261014201 turned into a separate issue #226
from nanodbc.
From @mloskot on November 21, 2016 15:15
PR #228 adds very minimal support to handle the SQL Server-specific types with existing nanodbc::timestamp
, without adding any new structures yet. The latter part is still being discussed.
from nanodbc.
From @mloskot on November 21, 2016 17:5
Following my findings in #229, extended nanodbc::time
would not be useful in case of PostgreSQL data types mapping.
I suspect, given the current knowledge, the extended nanodbc::time|timestamp
structures would be only dedicated to SQL Server-specific uses. If that is true, perhaps it is better to introduce separate structures and document their uses (or even conditionally-compiled for better clarify, as discussed in https://github.com/lexicalunit/nanodbc/issues/226#issuecomment-261984633).
from nanodbc.
From @mloskot on November 22, 2016 21:59
I started thread on pgsqlODBC list: Binding time and timestamp with time zone data type
I also tested and confirmed, what was actually expected, that binding timestamp column as SQL_C_SS_TIMESTAMPOFFSET
instead of SQL_C_TIMESTAMP
does not work with the pgsqlODBC driver.
from nanodbc.
@mkaes I think this one can be closed too by #272 ?
from nanodbc.
Related Issues (20)
- build fails as git submodule
- Add support for SQL_DRIVER_VER HOT 1
- The long string in the result read from the parquet file will be truncated. HOT 1
- Is there any other way to get the return value of a procedure? HOT 3
- Request advice on serializing result-sets to JSON HOT 6
- Encoding for query on SQLServer break characters
- nanodbc exceptions not containing all function output messages HOT 2
- error C2665: 'std::list<nanodbc::connection::attribute,std::allocator<nanodbc::connection::attribute>>::push_back': no overloaded function could convert all the argument types HOT 7
- Add CI jobs using Visual Studio 2022
- Invalid parameter number when using placeholder within a Common Table Expression HOT 1
- "Fetch type out of range" error when calling result.prior(), result.first(), result.last() or result.at_end() HOT 1
- Improve auto_bind_columns to recognise fine-grained types
- docs: Explore migration to hdoc.io for API reference
- FR: support sql-server datetimeoffset HOT 4
- Remove #if __GNUC__ conditions and its cases
- Compilation fails due to the use of deprecated features HOT 2
- Evaluate cmakelang project for formatting and linting CMake scripts
- Evaluate GHA get-cmake to easily install of CMake and Ninja for all workflows
- Invalid descriptor index HOT 2
- How to reset loop? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanodbc.