Comments (4)
@arden @jordic we've decided to start the implementation of MySQL support. We might even get to SQLite as well. If anyone has already started this and made any progress could you please let us know so we can merge?
As for other databases, I doubt we'll get to those any time soon, so anything else will remain up for grabs.
from sqlboiler.
Hi @jordic. A MySQL/MariaDB specific implementation of this interface is the starting point: https://github.com/vattle/sqlboiler/blob/master/bdb/interface.go#L8
The PSQL driver implementation is here for reference: https://github.com/vattle/sqlboiler/blob/master/bdb/drivers/postgres.go
For the compatibility tests, a main_test/mysql_main.tpl would be required as well. The postgres version is here: https://github.com/vattle/sqlboiler/blob/master/templates_test/main_test/postgres_main.tpl -- this code basically creates a test database, imports your schema into it, disables triggers (so there are no foreign key constraint complaints), runs the tests, then drops the test database. There may be a simpler way to disable foreign key constraints in MySQL, but in PSQL this was the best solution short of stripping them all from the schema dump using parsing.
Past this, there would be small changes required to the query builder (i.e. some conditionals to tell it not to convert ? to $1), and maybe some other small modifications here and there. Nothing major though, I do not imagine.
If you or someone else would like to work on this we're happy to give guidance wherever needed, but the interface implementation would be the best place to start (and the most difficult component -- the rest should be relatively straight forward).
from sqlboiler.
Hi @jordic -- we've released V2 which includes MySQL support. See here for release notes: https://github.com/vattle/sqlboiler/releases/tag/v2.0.0
Thanks.
from sqlboiler.
Hey! Thats cool!
I will give it a try as soon as I have time!
Great job, and great tool!
from sqlboiler.
Related Issues (20)
- Enum collision problem HOT 1
- Exposing more table constants/metadata to facilitate metaprogramming HOT 1
- Enum order auto-gen
- Eager loading user table results in an sql error if the user table has a delete_at field
- Bug: various int arrays are generated as `types.Int64Array` which leads to out of range errors in tests
- Bug: .Bind() is not working properly when selecting specific columns HOT 3
- types aliasing only replaces one type
- Request to revert PR #1290 (BUG) HOT 3
- Bug in `queries.MakeStructMapping` when boil tag is `boil:",bind"` HOT 1
- [feature request] MySQL Optimizer Hints HOT 4
- FeatureRequest: struct tag case only for json HOT 3
- Bug in queries/reflect.go in which bind does not check rows.Err() prior to returning sql.ErrNoRows HOT 1
- Bug when binding to *struct in struct HOT 1
- AndIn generates a list of pairs instead of a flat list. HOT 1
- Non deterministic column binding when same column name across two tables (inner join) HOT 1
- Configuring aliases for relationships for sqlite is not working HOT 6
- types.Hstore does not works HOT 1
- Foreign key causes "panic: interface conversion: string is not error: missing method Error" HOT 1
- Error: can't evaluate field IsView in type drivers.Table HOT 2
- Bug/breaking change on upsert with postgres in v4.16.0 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 sqlboiler.