SQLAlchemy currently beta-level support? Roadmap?

featurerequest

(Steven Hand) #1

This 2016 tutorial and this stable version v2.4.1 tutorial both say SQLAlchemy support in CRDB is just beta-level. I probably can’t use beta features in production, so here are a couple questions:

  • Is it accurate that the current level of support for SQLAlchemy is beta-level?
  • If the above is true, what is the roadmap/timetable for full support?

Thanks in advance!

P.S. Here’s a bonus question:

This blog post on CockroachDB’s Consistency Model says that, compared to Spanner, “CRDB is a more flexible and easy to migrate to database — think ORM support”. Any elaboration or pointers to doc on ORM support would be appreciated!


(Raphael 'kena' Poss) #2

We say SQLAlchemy support is “beta” to mean that not all features will work. However, we are already committed to continue to support those SQLAlchemy features that are already supported. If you find the current support to be adequate for your use case, you can rely on it safely.

Perhaps the word “beta” was inappropriate in the tutorial; a better word would be “incomplete” or “partial”.

As to the other point: Spanner’s originally did not support INSERT/UPDATE/DELETE to modify records, which in turn severely limited its use in 3rd party tools included by ORMs. Moreover, CockroachDB supports the PostgreSQL language dialect, which is widely supported by ORMs and thus facilitates migrations. Spanner uses a separate dialect which limits its compatibility. There is no more to take away from this comparison.

We will write more documentation on the topic of 3rd compatibility and the stability thereof before our next major release.


#3

Thank you for your support.


(Steven Hand) #4

Thanks for the assistance. Is there a way to know which are the SQLAlchemy features that are already supported, and which features will not work?


(Raphael 'kena' Poss) #5

Yes, we recommend you try it out with your application and see what happens.


(Ben Darnell) #6

In general, the weak points have to do with introspection (anything where sqlalchemy asks the database what columns exist, what their types are, etc) as opposed to things where the python code specifies everything sqlalchemy needs to know. SQLAlchemy has two modes of operation: the query builder and the ORM. We strongly recommend using the query builder; this is better tested and generally gives you more control over your queries.