Comments (4)
...and I've tried
drv := sess.Driver().(*sql.DB)
rows, err := drv.Query("DROP TABLE IF EXISTS birthdays; CREATE TABLE birthdays (name string, born time)")
...But it can't seem to find sql
or ql
if I change it to that.
I think this would work for me, but I just need a little more documentation. Thanks.
from db.
Adding "database/sql" to my import seemed to help...but then
attempt to update the DB outside of a transaction
So I go to use Tx instead:
drv := tx.Driver().(*sql.DB)
and
This action is currently unsupported on this database.
from db.
I'm currently working on fixing transactions with QL.
Related: #25
from db.
Transactions are working in QL again, see: #25
Creating tables using the upper
API is not supported and currently not planned, defining the data schema is a developer's responsibility and we should not make any assumptions on such decision.
If for some reason you need to create tables, you should use raw SQL. See the following example:
Line 314 in 9ef4a85
Also, each adapter has an example on how to use raw SQL: https://upper.io/db/postgresql
from db.
Related Issues (20)
- css/js not working HOT 2
- Nested struct without db tag not omitted on insert or update
- Feature request: New tag to ignore identity columns on update
- [support] Is there a way to use `not` operator in SQL builder HOT 2
- Build a bigquery adapter HOT 1
- V3 documentation is down HOT 3
- Documentation v4 typo in sql builder example
- Slow query seems too ugly and not fancy. HOT 5
- Project abandoned? HOT 5
- packages need to be upgraded or changed HOT 1
- Slow query HOT 1
- It can't parse cockroachdb DSN HOT 2
- mysql error on scanning binary() field into []byte
- loading module retractions HOT 1
- Data race in template writer when running concurrent tests with go test -race
- help db.v3
- no data in mongodb
- Unhandled error in select.go causes a nil pointer dereference
- Goroutinue leak
- [Bug] TableExists for mssql adapter uses database name as table schema when checking for existence
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 db.