aqueduct icon indicating copy to clipboard operation
aqueduct copied to clipboard

other db's ?

Open joeblew99 opened this issue 8 years ago • 21 comments

really nice framework.

anyone know if there is support for sql dialects, so that other databases can be targeted ?

maybe this is envisaged on the roadmap ?

joeblew99 avatar Nov 03 '16 01:11 joeblew99

To add support for another database, PersistentStore must be implemented. MySQL would likely be relatively straightforward, as it would be really similar to the Postgres implementation. There are a few places where things got tangled - specifically with DB migration and tests - where we would have to make some changes. The long term goal is to support other DBs as packages outside of Aqueduct.

itsjoeconway avatar Nov 03 '16 03:11 itsjoeconway

@joeconwaystk Sounds like the proper way to do it might be to introduce an actual dialects class, so that the PeristentStore and the Migration can both use them ? I remember Hibernate and NHibernate had dialects as first class objects.

its a long list, since Hibernate has been around for ever: https://docs.jboss.org/hibernate/orm/3.5/api/org/hibernate/dialect/package-summary.html

joeblew99 avatar Nov 03 '16 04:11 joeblew99

Not having a lot of experience with Hibernate, it looks like dialects are doing translations a lot closer to the syntax, whereas the goal for persistent store is to do those translations by behavior. Not saying that is going to work long-term, but that is the goal.

itsjoeconway avatar Nov 04 '16 18:11 itsjoeconway

i used NHibernate for years. https://github.com/nhibernate/nhibernate-core/tree/master/src/NHibernate/Dialect

If you even want a source of already worked out dialects, that i think might be the best source. Just saying.. Shall we leave this open ?

joeblew99 avatar Nov 04 '16 20:11 joeblew99

Aqueduct seems really interesting, and I'd very much consider using it for our stack, but we use MySQL, so this is preventing us.

mnordine avatar Jan 09 '19 13:01 mnordine

You can use any of the Dart MySQL drivers with Aqueduct, you just can't use the ORM features like Query and ManagedObject. Same goes for MongoDB or any other database.

itsjoeconway avatar Jan 09 '19 14:01 itsjoeconway

This isn't accurate. The types AuthServer, AuthController, AuthRedirectController, AuthToken, AuthClient, Authorizer and Authorization have no dependency or even relationship with PostgreSQL or the ORM.

The abstract interface AuthDelegate is overridden for storage/retrieval for auth-related tasks. There is one provided implementation that uses the ORM (and therefore PostgreSQL). You can provide your own implementation for that one type, and still use all of the classes above without any changes.

itsjoeconway avatar Jan 15 '19 15:01 itsjoeconway

I would really like to extend the AuthDelegate interface (or another ones) to use MySQL. Could you please guide me to some documentation or source code to achieve that?

MoacirSchmidt avatar Jan 16 '19 00:01 MoacirSchmidt

Override this class in the docs, and pass instance of it to your AuthServer constructor:

https://pub.dartlang.org/documentation/aqueduct/latest/aqueduct/AuthServerDelegate-class.html

itsjoeconway avatar Jan 16 '19 01:01 itsjoeconway

You were completely right, joeconwaystk. I have just override AuthServerDelegate for my needs and it was pretty easy! You have done a great job! Thank you very much!

MoacirSchmidt avatar Jan 17 '19 02:01 MoacirSchmidt

And What about the Google and facebook integrated login. Is aqueduct ready for that?

MoacirSchmidt avatar Jan 17 '19 20:01 MoacirSchmidt

Yes and no. There won't be any full integrations for a particular identity provider. You can attach data to an Authorization object or request that comes from another identity provider, and you can use client packages on pub for a particular identity provider to get that data. I don't think the framework should set a standard on how you integrate with those types of identity providers.

itsjoeconway avatar Jan 17 '19 21:01 itsjoeconway

I overrided AuthServerDelegate to support Microsoft SQL Server databases. It is working pretty well!

Unfortunately I was unable to solve a little issue: Is there a way for me to pass a parameter to getResourceOwner in order to identify the user throughout several different applications (but same database)?

MoacirSchmidt avatar Mar 18 '19 23:03 MoacirSchmidt

You were completely right, joeconwaystk. I have just override AuthServerDelegate for my needs and it was pretty easy! You have done a great job! Thank you very much!

@MoacirSchmidt , could you share a solution for MySQL. The problem is that I do not have the proper experience and deep knowledge in DART

BNSby avatar Feb 05 '20 14:02 BNSby

I overrided AuthServerDelegate to support Microsoft SQL Server databases. It is working pretty well!

Would you like to share with us? I'm using MSSQL Server as well. Thanks

yusrenaltair avatar Feb 13 '20 08:02 yusrenaltair

I overrided AuthServerDelegate to support Microsoft SQL Server databases. It is working pretty well!

Would you like to share with us? I'm using MSSQL Server as well. Thanks

+1

maurobotta avatar Jul 31 '20 09:07 maurobotta

I overrided AuthServerDelegate to support Microsoft SQL Server databases. It is working pretty well!

Would you like to share with us? I'm using MSSQL Server as well. Thanks

+1

+1

thapp-com-br avatar Aug 03 '20 23:08 thapp-com-br

New 4.0 version will support mysql ?

maurobotta avatar Aug 04 '20 06:08 maurobotta

@maurobotta No. Except if someone decides to make a pull request with it.

Reductions avatar Aug 04 '20 08:08 Reductions

@Reductions

This https://github.com/stablekernel/aqueduct/pull/880

maurobotta avatar Aug 05 '20 15:08 maurobotta

@maurobotta The problem is that there are 0 teat in this pull request + there are a few existing tests that fail.

Reductions avatar Aug 05 '20 17:08 Reductions