GithubHelp home page GithubHelp logo

Comments (7)

lexicalunit avatar lexicalunit commented on May 17, 2024

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.

lexicalunit avatar lexicalunit commented on May 17, 2024

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.

lexicalunit avatar lexicalunit commented on May 17, 2024

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.

lexicalunit avatar lexicalunit commented on May 17, 2024

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.

lexicalunit avatar lexicalunit commented on May 17, 2024

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.

lexicalunit avatar lexicalunit commented on May 17, 2024

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.

mloskot avatar mloskot commented on May 17, 2024

@mkaes I think this one can be closed too by #272 ?

from nanodbc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.