Hi, I'm trying to use Cosmos DB as my backend and it's failing to initialize the models because for whatever reason Cosmos DB doesn't support ALLOW FILTERING on the system tables. The following query is failing:
I commented out the part of the query that uses base_table_name and checked the resulting rows against it in code (instead of relying on Cassandra) and it seems to have gotten past it.
I can certainly create a PR for this change but I'm not sure if that's how you'd like to handle this (or even if you want to handle it at all). I love Express Cassandra and would really like to use it on this project so would like to see if there's anything we can do.
Options:
Remove the base_table_name from the WHERE clause and check for the base_table_name when checking the view_name field. This is easy, but I can see the argument that the query is getting an unnecessary set of rows for each table. My argument would be that there would have to be a very large number of views before this makes any performance difference.
Retrieve and cache the rows per keyspace, in order to limit the unnecessary rows being retrieved for each model. This technically performs better but I don't think there's enough value to warrant this level of work.
Hi, I'm trying to use Cosmos DB as my backend and it's failing to initialize the models because for whatever reason Cosmos DB doesn't support
ALLOW FILTERING
on the system tables. The following query is failing:https://github.com/masumsoft/express-cassandra/blob/master/src/builders/table.js#L355
I commented out the part of the query that uses
base_table_name
and checked the resulting rows against it in code (instead of relying on Cassandra) and it seems to have gotten past it.I can certainly create a PR for this change but I'm not sure if that's how you'd like to handle this (or even if you want to handle it at all). I love Express Cassandra and would really like to use it on this project so would like to see if there's anything we can do.
Options:
base_table_name
from the WHERE clause and check for thebase_table_name
when checking theview_name
field. This is easy, but I can see the argument that the query is getting an unnecessary set of rows for each table. My argument would be that there would have to be a very large number of views before this makes any performance difference.Thoughts?