mei-rune / gobatis Goto Github PK
View Code? Open in Web Editor NEWAn easy ORM tool for Golang, support MyBatis-Like XML template SQL
Home Page: https://runner-mei.github.io/GoBatis
An easy ORM tool for Golang, support MyBatis-Like XML template SQL
Home Page: https://runner-mei.github.io/GoBatis
Looks like all the docs in Chinese now, do you have documentation in english?
我看了作者的文档,跟我想的比较类似,我虽然借鉴了mybaties理念, 但是作者还是更接近mybaties,作者的一些功能正是我要开发的,我的没有那么复杂,很佩服作者对mybaties研究那么深入
PostgreSQL database has the RETURNING clause, it is very useful.
Currently the CreateUser method can return only ID of inserted row:
type Users interface {
CreateUser(name string): (int64, error)
}
I want create method CreateUser with returning struct pointer and error.
Support "returning" clause will able to write more power SQL queries, something like this:
users.go
type User struct {
TableName struct {} `db:"users"`
ID int64 `db:"id"`
Created time.Time `db:"created"`
Name string `db:"login"`
}
type Users interface {
CreateUser(name string): (*User, error)
}
users.xml
<bogatis>
<insert id="Users.CreateUser">
INSERT INTO users (id, created, name)
VALUES (nextval('seq_users_id'), now(), #{name})
RETURNING id, created, name
</insert>
</bogatis>
是不是模板漏写了?
recently,I‘m learning about go,I saw this framework that seems like mybatis,soI want to know the perfome metrics about it ,By thy way, I'm javaer,Thank you
GetXXX() 到一个 struct的时候,说不是指针无法scan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.