-
Notifications
You must be signed in to change notification settings - Fork 135
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
Using values that are not constant in our Provider #51
Comments
For select statements there's the @Where(path = "mypath")
public static String[] dynamicWhere() {
return new String[] {
MyColumns.COLUMN + ">" + util.getCurrentTime(),
};
} This is called every time the "mypath" uri is queried. Does that solve your problem? |
Hello @SimonVT and thanks for your promptly response. Isn't the Look, here are some queries I can't replicate with schematic right now:
As you can see, I use the util.getCurrentTime() twice (for the outer where and inside the select of the LEFT JOIN). For the outer, no problem, Another example:
Here I need a passedShowId in the outer In both cases, I can't find a way of doing that using Not sure about a solution but... What about a way of passing parameters to inners queries? Would that be possible? |
No, there For joins there is currently no solution. A |
I see... Those |
Added a |
Version 0.6.7 now, I messed up regular joins in 0.6.6. |
I wonder how to do this using schematic. I've been avoiding complicated queries and I tried to avoid this as much as I could but I have some use cases where I need it.
I do need some queries that have sub-queries that need non constant values (like executing a function that will return the current date).
If I try to do that with schematic, I'll get:
This is easy to fix if that value should be in the outer query, so we can create an
@InexactContentUri
and pass anything we want from our code, example:That would work fine, but if I do need
util.getCurrentTime()
inside a subquery, I can't do it. I am assuming this is a limitation of the Annotation model. So... Is there a way to do this using schematic? Is it possible to write the call in a fully raw mode way and generate the provider too?The text was updated successfully, but these errors were encountered: