Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

[2017] i need mysql or oracle support #36

Closed
Yonghang opened this issue May 26, 2017 · 8 comments
Closed

[2017] i need mysql or oracle support #36

Yonghang opened this issue May 26, 2017 · 8 comments

Comments

@Yonghang
Copy link

now, i develop some server on mysql or oracle, not NOSQL, i need angel provide mysql or oracle support

@thosakwe
Copy link
Member

thosakwe commented May 26, 2017

NOTE: This thread dates to 2017, scroll to the bottom.

Hi, thanks for the feedback!

Believe it or not, you are the first to express desire for relational database support. Technically, Angel can use any database, and it is extremely easy to write a service to access your database securely over REST/WebSockets.

The reason that there is no official angel_mysql or angel_oracle support (yet) is that Dart currently does not have an adequate driver for either database. The existing drivers use an outdated version of the "crypto" library, and thus are incompatible with Angel's security features.

Our hope for using relational databases lies in query_builder, which is far from done. The goal is to provide a single database layer with fluent querying. However, the MySQL drivers are still outdated.

So, in short, if you want to use SQL with Angel, your best bet is to use PostgreSQL, and write a service class that runs prepared statements. This isn't bad at all, and isn't vulnerable to SQL injection, but official support would be nicer.

Sorry for the inconvenience. Right now, SQL support isn't on the roadmap, so you'll need to write a service class. Hopefully Angel's other features more than make up for this.

@thosakwe
Copy link
Member

@Yonghang I thought about this, and I decided that I will work on a generic SQL service class. Then users can simply plug in PostgreSQL, MySQL, whatever. The classes will be secure, and invulnerable to SQL injection.

Sorry for the wait.

@Yonghang
Copy link
Author

Yonghang commented Jun 8, 2017

Thank you for your hard work!

@thosakwe
Copy link
Member

@Yonghang You might consider watching the repo, so you'll know when it's ready:

https://github.com/angel-dart/query_builder

@thosakwe
Copy link
Member

Another update. By the end of next week, you'll be able to use PostgreSQL with Angel.

Keep track here:
http://github.com/angel-dart/orm

@thosakwe
Copy link
Member

thosakwe commented Jul 1, 2017

Still working on the ORM. Running into some problems with the PostgreSQL driver, but the code generation is pretty spot-on.

I'm developing an application using it, so that should expedite the release of an alpha.

@thosakwe
Copy link
Member

@Yonghang As of today, angel_serialize and angel_orm are in 1.0.0-alpha. Feel free to try them out!

I'm going to mark this issue as closed. For further tracking, follow the repo: https://github.com/angel-dart/orm

@thosakwe
Copy link
Member

thosakwe commented Jul 4, 2019

Two years later, I should update this issue. Here is Angel's ORM. At the moment, it supports PostgreSQL. Down the line, it could potentially eventually support MySQL, if there is enough demand for it (and good enough driver support): https://github.com/angel-dart/orm

@thosakwe thosakwe changed the title i need mysql or oracle support [2017] i need mysql or oracle support Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants