Git Product home page Git Product logo

Comments (5)

guregu avatar guregu commented on August 31, 2024

Thanks!
What SQL types would it match up with? If it works with major DBs like MySQL/Postgres/SQLite then I would maybe be interested in adding it.

from null.

guregu avatar guregu commented on August 31, 2024

Just a warning though in general I intend to support only the types that driver.Value can be. https://golang.org/pkg/database/sql/driver/#Value

However, if we can demonstrate that this would be widely compatible then it might be worth adding. It may be a better idea to add it to https://github.com/guregu/toki or make a new package.
Either way please feel free to fork this library or toki and I'll take a look at it.

I appreciate that you made an issue first 👍

from null.

njern avatar njern commented on August 31, 2024

I can't speak for MySQL but the corresponding type in PostgreSQL is interval. I think it's a fairly normal data type to store in databases, either as a field by itself or then as the result from a +/- operation between two timestamps.

I looked at toki and still think this package could be a better fit but happy to hear your thoughts.

from null.

guregu avatar guregu commented on August 31, 2024

Alright, feel free to submit a patch here!

from null.

guregu avatar guregu commented on August 31, 2024

Sorry for waffling about this, but I've decided to limit the package to the types supported by the sql driver.

from null.

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.