Comments (2)
Nice one, Anindya.
See, your Test
struct:
type Test struct {
firstName string `field:"firstname"`
lastName string `field:"lastname"`
}
Has two fields indeed, but the two of them are private. In order to be visible by upper.io/db
fields must be public or exported (name must be capitalized).
type Test struct {
FirstName string `field:"firstname"`
LastName string `field:"lastname"`
}
This is mentioned nowhere, hence is a documentation bug and we'll be tracking it here https://github.com/upper/db-docs/issues/5.
from db.
Thanks Xiam. I should have guessed that, but I am very new to golang and learning it by some hands-on code. Thanks again for making it clear.
from db.
Related Issues (20)
- sql: Scan error on column index 1, name "com_name": converting NULL to string is unsupported HOT 3
- SQLite Adapter doesn't roll back transaction on error HOT 3
- argument not replaced when inside subquery
- Sharing connections between goroutines HOT 1
- Feature request: Collection.Update method without returning
- css/js not working HOT 2
- Nested struct without db tag not omitted on insert or update
- Feature request: New tag to ignore identity columns on update
- [support] Is there a way to use `not` operator in SQL builder HOT 2
- Build a bigquery adapter HOT 1
- V3 documentation is down HOT 3
- Documentation v4 typo in sql builder example
- Slow query seems too ugly and not fancy. HOT 5
- Project abandoned? HOT 5
- packages need to be upgraded or changed HOT 1
- Slow query HOT 1
- It can't parse cockroachdb DSN HOT 2
- mysql error on scanning binary() field into []byte
- loading module retractions HOT 1
- Data race in template writer when running concurrent tests with go test -race
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 db.