Comments (7)
Was able to test it recently, everything works as expected. Thanks a lot for your help!
This project looks like a fantastic solution to the eternal problem of having your database in sync with the code and avoiding tons of boilerplate, more robust and stable than data providers ❤️
from sqlhydra.
If this is a feature of SqlKata then it definitely could (and should) be added to SqlHydra!
Perhaps an entities
operation could be added to the insert
builder.
from sqlhydra.
There is this overload of AsInsert
:
public Query AsInsert(
IEnumerable<string> columns,
IEnumerable<IEnumerable<object>> rowsValues)
that I think can be used for insert-many. Would be also nice to not have to pass a list of columns but automatically infer them as it is currently done for a single entity
.
from sqlhydra.
That overload doesn't take returnId
as in input. Hopefully the current overload that takes KeyValuePair seq
will work for multiple columns.
Does SqlKata allow returning multiple ids for multiple inserts?
from sqlhydra.
I am not sure, I was looking at this example.
And the execution of insert many, which doesn't seem to return anything at all.
from sqlhydra.
Ahh ok, I bet it does not support automatically returning identity fields for multiple inserts, which seems reasonable. That is probably why the overload for multiple inserts doesn't allow for the returnId
field.
SqlHydra could probably support this, but for v1 of this feature, I think it would be best to throw the following exception:
"getId
is not currently supported for multiple inserts via the entities
operation."
from sqlhydra.
v0.530.0 has been published with multiple inserts via entities
operation.
Note that you since getId
is not supported for multiple inserts, you will need to replace it with excludeColumn
.
from sqlhydra.
Related Issues (20)
- Conditional where's, orderBy's, and thenBy's HOT 6
- `where` clause with direct boolean column does not work HOT 4
- Filters for large databases HOT 13
- Missing oracle timestamp datatypes HOT 5
- Feature Request: Upserting multiple records to a single statement HOT 2
- New "Query Logging" feature doesn't capture inserts properly HOT 1
- Some `where` property comparisons do not create a `QueryParameter` HOT 1
- Make a selected column from a leftJoined table option with `Some`
- Support net8.0 HOT 17
- Add documentation and setup configuration on how to clone the repo, build the project, and run tests. HOT 2
- Creating sqlhydra file updates the wrong .fsproj file HOT 9
- SQL Server Temporal Tables Select Issue HOT 8
- Retrieve Multiple result sets (UNION ALL) using SqlHydra.Query HOT 1
- Insert and Update Builders break when column name is the same as another table. HOT 2
- Mapping object with list of objects 1 to n relationship HOT 4
- Best practice for multiple environments and the config.toml file HOT 7
- Design patterns for DDD HOT 8
- Is it possible to support materialized views from Postgres? HOT 22
- Generate types in GitHub workflow generates no table types HOT 5
- Show filter info in SqlHydra.Cli command line output HOT 1
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 sqlhydra.