Comments (2)
Hi,
sql.Result has two methods:
type Result interface {
LastInsertId() (int64, error)
RowsAffected() (int64, error)
}
LastInsertId()
is automatically bound to your struct if you specify an autoIncr key via TableMap.SetKeys(). RowsAffected() isn't currently mapped, but I'm curious when that would be useful.
What's your use case where you need the raw sql.Result?
from gorp.
ok,thank you!
from gorp.
Related Issues (20)
- SqlServerDialect invalid create schema statement
- If there is a default value for the tag, it will always be inserted.
- v3 module naming causes error when requested HOT 3
- Is there a postgres read replicas support?
- Get without assertion HOT 2
- update fails to find table
- select on conflict HOT 2
- Object Mapper design/functionality?
- How about making a v3 branch the default branch? (suggestions for future mainenance) HOT 2
- Some naming violates "Go Code Review Comments (Initialisms)" HOT 2
- maybeExpandNamedQuery & driver.Valuer conflict HOT 1
- Support sql.IsolationLevel for transactions
- security: Add support for another column along with autoincrment column in where clause in update statement
- DbMap.Select fails when passed only one parameter *time.Time.
- Oracle: Create the table is not working
- context cannot be passed to DbMap.Begin
- per-transaction timeout interval setting in DbMap
- Snowflake support
- Issue with Parameter Info when execute QueryContext with parameter encode.
- CreateTablesIfNotExists() generates an error when using sql server driver
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 gorp.