Comments (5)
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template!
from fiber-go-template.
Hi,
What do you mean, “it's working”? What kind of error or stack is output? To give more information, so far, it is not clear either the cause of the error or how to reproduce it to fix it (if it is confirmed, of course).
from fiber-go-template.
Sorry for the lack of information.
The function used to get all books in the template was the way to get a single result, for this way the return is always empty:
// You can also get a single result, a la QueryRow
jason = Person{}
err = db.Get(&jason, "SELECT * FROM person WHERE first_name=$1", "Jason")
fmt.Printf("%#v\n", jason)
But since we want can to obtain the list of all books, we must use this other function (as it says in the documentation of jmoiron/sqlx):
// if you have null fields and use SELECT *, you must use sql.Null* in your struct
places := []Place{}
err = db.Select(&places, "SELECT * FROM place ORDER BY telcode ASC")
if err != nil {
fmt.Println(err)
return
}
That's it! I hope it's useful!
Thanks
from fiber-go-template.
👋 Hello. Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.
from fiber-go-template.
⚡️ This issue has been automatically closed because it has not had recent activity.
from fiber-go-template.
Related Issues (20)
- errSaveToRedis Causes Panic HOT 3
- `swag init` breaks `make critic` HOT 2
- zsh: killed cgapp create HOT 4
- flutter app? HOT 3
- pwa example please! HOT 3
- Running make test results in failure HOT 6
- go version error in Dockerfile HOT 1
- Dependabot can't resolve your Go dependency files HOT 1
- Swagger docs broken HOT 3
- Dependabot can't resolve your Go dependency files
- Wrong key for claims HOT 1
- Dependabot can't resolve your Go dependency files
- Dependabot can't resolve your Go dependency files
- Dependabot can't resolve your Go dependency files
- Dependabot can't resolve your Go dependency files
- Dependabot can't resolve your Go dependency files
- replace *fiber.App with fiber.Router Interface HOT 3
- Error starting app HOT 2
- os.Interrupt does not respond to Ctrl+C after fiber get some requests HOT 3
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 fiber-go-template.