-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User defined type support #159
Comments
Thanks for this @felipefzdz I think this looks good. The only other way I can think of representing them in stubbed cassandra is to have them created independently of a regular prime then be referenced from a prime. That way the grammar would be the same as the cassandra grammar. E.g Have a create type endpint that takes in:
Then just refer to it as A feature I have wanted for a long time but would require a lot of work is for scassandra to take your schema so that you do not need to prime variable types in prepared statements. That is by far the most common user error with scassandra (not priming them or priming them after the prepare of the statement). If you are game for starting work on that I suggest we go with the create type syntax as it'll be consistent with passing the whole schema in future versions of scassandra. |
That was actually my first idea but I discarded it as I was mislead by the static nature of antlr4. Correct me if I wrong but the idea would be:
If this is correct I'll start working in the first bullet point :) |
Small question @chbatey. Assuming .withColumnTypes(column("fiscal_address", ???)) In those question marks I should include a |
Before getting into the details I'd like to share some ideas about this issue. The example that I'll use is this one:
Priming UDTs: Java Types and Antlr
An UDT is basically a set of UDT Fields. Client usage would be something like this:
Let's jump now into
cql-antlr
. One possible representation of an UDT might be:"udt<text set<text>>"
Antlr grammar would incorporate something like this (pseudo antlr code):
This grammar presents a recursion problem as an UDT should not contain an UDT itself. Not sure if that would be a massive problem.
A possible test case in
CqlTypeFactoryTest
would be:Any thoughts?
The text was updated successfully, but these errors were encountered: