Comments (5)
Could you also generate JSON tags with omitempty for optional NULL columns please?
from tables-to-go.
@kaihendry: sorry but I don't want to introduce json
tags in a tool which handles mapping database tables to structs. Like I tried to explain here, working with your tables from the database and representing the data in what format whatsoever are two different concerns which I dont want to mix here.
from tables-to-go.
Yeah, you're right. I can add them myself with :GoAddTags but I am super lazy with marking the optional values as omitempty.
from tables-to-go.
I found the null documentation a little weird. https://youtu.be/1mnMmMF3Dx0?t=451
native|primitive
? Just a comment. No need to change anything.
from tables-to-go.
Hm I see, maybe I should point it more out which options means what.
sql
stands for thesql.Null*
datatypesprimitive
andnative
map to the same thing namely using golang's builtin datatypes with pointers
from tables-to-go.
Related Issues (20)
- add unit tests
- Id should be all caps
- Required versus optional value mappings HOT 2
- Error if column names start with digits HOT 3
- Add an option to continue through errors HOT 1
- can you support sqlite? HOT 1
- MySQL 8 has UPPERCASE columns in information_schema HOT 1
- How to generate struct with gureu/null? HOT 1
- Where is the SQLite makefile? HOT 2
- database/sql import not being set on models HOT 2
- support unix socket connection HOT 2
- go:build comment without // +build comment HOT 6
- generate json tag [feature request] HOT 1
- Not null enum columns return pointers HOT 3
- Force NULL for all columns? HOT 3
- Generate structs of database views HOT 5
- How to connect to Postgres/CockroachDB without SSL mode?! HOT 4
- Specify table(s) and generated filename HOT 1
- tags getting title'ized instead of preserving the original column name
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 tables-to-go.