-
Notifications
You must be signed in to change notification settings - Fork 13
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
Migration instructions #191
Comments
change column was dropped, I think it's now only position, right? |
The released version is The The Yes, the return type of |
I think right now I'm ok with the changes, I can adjust code on my side without too much troubles. Some more cases which I encountered and the solutions for it (I'll add some more comments on this ticket for other cases I convert while changing my codebase, might be useful for others).
didn't work anymore for undefined meta entries, but you can write it like this
similar instead of
you need to write
|
Created #192 for an issue where I didn't find a way to rewrite the query (location with pad directive) |
I don't understand how the first version of this query fails. Maybe I don't get what you mean with "undefined meta entries". If the commodity has no metadata associated, |
This is spelled The fact that the |
That is what I was expecting. But those are actually missing, so it seems null != "invest" is somehow evaluated to true. |
It works as expected here:
However, I think that what you want is
|
Yes that's exactly the difference in behavior to what it was before. I think the new behavior is more in line with other SQL cases and therefore makes sense. |
Yes, handling of NULL values accordingly to the SQL standard is an intentional change in behavior. |
I had a couple similar cases, basically before non existing meta was considered as "" and now it's null. I think null actually makes more sense, so the new behavior is good and cleaner, just something to be aware of when migrating. I think I'm now through with the migration of the codebase and it was actually quite simple, to summarize the points I had to do
I think all the changes make sense and are leading to cleaner code. |
Thanks for your comments and for being an early adopter!
The new syntax is supported by |
Are there any migration instructions anywhere?
I see https://github.com/beancount/beanquery/blob/master/CHANGES.rst which describes some of the changes but trying to convert my code from beancount 2 over to beanquery is right now more a trial and error with some looking through the source.
e.g. I used to do
and I think now I need to do
As I'm embedding this into my own code, there are also changes with the returned data on the run_query, before the rows were named tuples, now I think they only contain the data and I have to get the names out of the types, correct?
The text was updated successfully, but these errors were encountered: