Closed regularfellow closed 1 year ago
Thanks! I'm right in the middle of the second wave of changes so this is good timing. For what it's worth here is the branch where I am putting the second wave of changes together: https://github.com/edgedb/easy-edgedb/tree/add-migration-flow
I'll definitely go through all of your comments too and see which ones I missed and which parts I got already. (e.g. coincidentally I came across the Json output you mentioned today and changed it)
Changes so far:
64-bit integers: Changed this to int64.
Update output: Good catch! Rewrote this part and added an explanation of the assert_exists function as a quick way to assert that something was done to places_visited.
Json output: changed a few days ago as mentioned above
CREATE FUNCTION: I've been removing raw DDL statements (and recommendations to use it) from the book so this one is already gone.
f_places: I've changed this to x_places, should be safe now...
For the last two I'll see what happens when I get to that point in the book. (Probably will be next week)
Thanks again!
Two more updates: changed the f_places query to search for places that start with x, and lover property is now lovers. Should get to the last issue raised later today.
@regularfellow Yes, you're right about the delegated part - it wasn't before. The name will stay as Lucy but I've added a note that the MinorVampire object could have had the same name as before. I think that takes care of all the items raised!
Feedback on things that may have changed from earlier EdgeDB or Easy EdgeDB versions. Ran on 2.3.1+ef99779.
https://www.edgedb.com/easy-edgedb/chapter2#casting:~:text=And%20you%20will%20get%2018%2C%20a%2032%2Dbit%20integer. "select \'9' + 9; And you will get 18, a 32-bit integer."
Perhaps slightly out of date, edgedb seems to now default to int64 and favor higher precision when adding.
https://www.edgedb.com/easy-edgedb/chapter6#filtering-on-sets-when-doing-an-insert:~:text=And%20if%20we%20had%20written%20something%20like%20filter%20.name%20%3D%20%27SLLLovakia%27 "And if we had written something like FILTER .name = 'SLLLovakia' then it would return {}" The NPC appears to be returned even if an empty set is added to places_visited despite the text.
https://www.edgedb.com/easy-edgedb/chapter10#working-with-tuples-and-arrays:~:text=%7B(%22%5C%22London%5C%22%22%2C%203500000)%7D Json on default output-format now looks like
Json("\"London\"")
.https://www.edgedb.com/easy-edgedb/chapter17#:~:text=create%20function%20fight_2 Trying to use
CREATE FUNCTION
returnsQueryError: bare DDL statements are not allowed in this database
.https://www.edgedb.com/easy-edgedb/chapter12#more-about-cartesian-products-and-the-coalescing-operator:~:text=The%20result%20may%20not%20be%20what%20you%E2%80%99d%20expect. "The result may not be what you’d expect: {}" Earlier chapter added Country "France" so example may need to be updated https://github.com/edgedb/easy-edgedb/blob/f8e5f1f87e3bbaebe81281a170958880a77a978a/chapter11/code.md?plain=1#L139-L141
https://www.edgedb.com/easy-edgedb/chapter12#more-about-cartesian-products-and-the-coalescing-operator:~:text=select%20Vampire.lover.name
select Vampire.lover.name ?= Crewman.name;
Person'slover
property is nowlovers
: https://github.com/edgedb/easy-edgedb/blob/f8e5f1f87e3bbaebe81281a170958880a77a978a/chapter11/code.md?plain=1#L10https://www.edgedb.com/easy-edgedb/chapter13#:~:text=We%20need%20to%20give%20a%20new%20name%2C%20so%20as%20not%20to%20clash%20with%20former_self "We need to give a new name, so as not to clash with former_self" Property
name
is a delegated exclusive so would it clash unless former self was also MinorVampire? https://github.com/edgedb/easy-edgedb/blob/f8e5f1f87e3bbaebe81281a170958880a77a978a/chapter12/code.md?plain=1#L6-L8