Comments (5)
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.
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.
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.
Alright, feel free to submit a patch here!
from null.
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)
- Bad marshaling implementation on null.Time struct
- Why does null.Time text-marshaling return null string? HOT 3
- Release v4 HOT 2
- Request parsing for null.Time HOT 1
- null.String composite literal uses unkeyed fields HOT 2
- error undefined: sql.NullTime HOT 1
- Storing null values using this library in database HOT 3
- Strings.StringFrom() passes Valid as true even if the string is empty HOT 3
- how versions are working HOT 1
- undefined: sql.NullTime HOT 1
- Bug on undefined type HOT 1
- [Question] Is it possible to have SQL null values treated as null in Go but encode them to zero in JSON? HOT 2
- Not to use sql.Null*** for storing value? HOT 1
- Issue with omitempty HOT 4
- Not to use fmt.Errorf for UnmarshalJSON error HOT 6
- Generics support HOT 7
- how use json null set sql time field to null? HOT 3
- uint64 support HOT 2
- field: models.SysUserBean.Username, unsupport field type &{{ %!s(bool=false)}}, may be miss setting tag
- I am getting following error when importing this package 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 null.