Comments (3)
Hi, I guess beside not using UPSERT but a kind of UPDATE/SELECT/INSERT combination with exception handling, I'm not aware of other options than adding support for UPSERT in sqlalchemy-hana. I'm currently busy working on cleanup tasks, but I can have a look in the following weeks
from sqlalchemy-hana.
@therhaag I did some research and I guess we need to make a difference between SQLAlchemy core and SQLAlchemy ORM.
For SQLAlchemy core, the only way is a manual approach using SELECT, INSERT and UPDATE. Not nice and it has some roundtrips. For this, we could build an UPSERT construct.
For SQLAlchemy ORM using the Session API on the other hand it's not quite easy, because how sessions work. For this, I would recommend using session.merge
. I also found a blog explaining the idea.
So let's focus on SQLAlchemy Core. I guess it makes sense to invent a completly new construct, because neither insert nor update have a similar syntax compared to UPSERT.
As said, I'm happy to work on this in the next weeks but to be transparent, It will most likely somewhen in January. If you like you can also try to open a PR
from sqlalchemy-hana.
@therhaag 1.2.0 was just released 😄
from sqlalchemy-hana.
Related Issues (20)
- Release version 1.0 HOT 3
- Excessive warning because of wrong value of supports_statement_cache HOT 1
- Support Create/Drop view DDL
- [rl-license_file-1] Violation against OSS Rules of Play
- Support ARRAY type
- Fix and enable excluded SA suite tests HOT 1
- Clenup testing suite
- Support SQLAlchemy statement caching
- authentication failed with LDAP user HOT 3
- Existing tables not recognized when autogenerating migrations with alembic HOT 6
- Support/Block missing types
- Implement _get_server_version_info
- VARBINARY has no length
- Simplify LOB types
- Support identity columns
- Create issue templates
- Rename table fails with syntax error
- Version 1.1 breaks backward compatibility HOT 5
- Unable to create table with ALPHANUM column 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 sqlalchemy-hana.