Comments (4)
Using the same methods you retrieve results from the database right now?
from duckdb-rs.
the current insert method is to execute through the connection, and the returned result type is the number of rows changed, which seems to indicate the number of rows successfully written. What I mean is, how to get the value of the RETURNING field during insertion, such as the increasing row sequence number.
from duckdb-rs.
Like I said, the exact same way you get any other data:
let db = checked_memory_handle();
db.execute_batch("CREATE TABLE foo(x INTEGER);")?;
let re: i64 = db.query_row("INSERT INTO foo(x) VALUES (?) RETURNING x", [1], |r| r.get(0))?;
assert_eq!(res, 1);
from duckdb-rs.
get it,thank u @Mause
from duckdb-rs.
Related Issues (20)
- using vendored_openssl with bundled ducdkb-rs HOT 2
- Bump to DuckDB 0.10.3 HOT 3
- Help: how to fetch datetime type correctly? HOT 1
- `FromSql` is not implemented for `Vec<f64>`
- [BUG] 'gen_random_uuid()' Constraint Error: Duplicate key HOT 1
- BUG: duckdb::data_t* duckdb::Allocator::AllocateData(duckdb::idx_t): Assertion `size > 0' failed HOT 1
- Extension Metadata HOT 5
- Vec<u32> serialization?
- Cannot use `duckdb_interrupt` due to private `InnerConnection`
- Feature request - Decimal type in appender API HOT 3
- Leading x00 byte when querying BIT value using arrow HOT 1
- INTERVAL doesn't seem to be encoded properly in arrow HOT 2
- Extension Autoloading Error: Failed to Download JSON Extension HOT 4
- `bindgen` CI failing on Windows
- how to cancel a query? HOT 1
- Is there a way to register scalar function in ext?
- crash when reading wrong format excel HOT 2
- Dependency on arrow is dictating release cycle of this crate
- Bundle `icu` extension at compile time
- how to create multiple in memory database? HOT 2
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 duckdb-rs.