From 79c183cbcea8846bf977e24c42bf67e9ca99d8f5 Mon Sep 17 00:00:00 2001 From: Kyle Xie Date: Wed, 24 Aug 2022 22:46:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=8B=B1=E6=96=87=E5=AD=97?= =?UTF-8?q?=E5=B9=95=E7=9A=84=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- video/edgedb-day-1.0/subtitles/en/6.bcc | 647 ++++++++++++------------ 1 file changed, 323 insertions(+), 324 deletions(-) diff --git a/video/edgedb-day-1.0/subtitles/en/6.bcc b/video/edgedb-day-1.0/subtitles/en/6.bcc index 30e0b64..d34a826 100644 --- a/video/edgedb-day-1.0/subtitles/en/6.bcc +++ b/video/edgedb-day-1.0/subtitles/en/6.bcc @@ -9,1934 +9,1933 @@ "from": 6.781775, "to": 8.45, "location": 2, - "All right." + "content": "All right." }, { "from": 9.434425, "to": 15.440425, "location": 2, - "Hi everyone, um and like Colin said, I'm a recovering academic, I've got my uh" + "content": "Hi everyone, um and like Colin said, I'm a recovering academic, I've got my uh" }, { "from": 15.440425, "to": 18.81879899900057, "location": 2, - "clicker from my thesis defense which is hopefully good luck." + "content": "clicker from my thesis defense which is hopefully good luck." }, { "from": 18.893968093000378, "to": 22.24722500000018, "location": 2, - "I'm going to be talking about compiling EdgeQL, " + "content": "I'm going to be talking about compiling EdgeQL, " }, { "from": 22.24722500000018, "to": 25.575549999999996, "location": 2, - "which is subtitled uh, Standing on the shoulders of giants. " + "content": "which is subtitled uh, Standing on the shoulders of giants. " }, { "from": 25.675650000000363, "to": 29.62960000000018, "location": 2, - "Because uh we think we have with EdgeDB and EdgeQL" + "content": "Because uh we think we have with EdgeDB and EdgeQL" }, { "from": 29.62960000000018, "to": 33.10807500000054, "location": 2, - "seen a little further uh... than others, " + "content": "seen a little further uh... than others, " }, { "from": 33.18315000000036, "to": 35.635600000000174, "location": 2, - "and we think a lot of the reason we've done that is " + "content": "and we think a lot of the reason we've done that is " }, { "from": 35.635600000000174, "to": 39.764725000000176, "location": 2, - "because uh we're standing on the shoulder of a giant - Postgres." + "content": "because uh we're standing on the shoulder of a giant - Postgres." }, { "from": 39.764725000000176, "to": 43.09304999999999, "location": 2, - "So I'm going to talk about 3 main different things " + "content": "So I'm going to talk about 3 main different things " }, { "from": 43.09304999999999, "to": 46.071025000000354, "location": 2, - "as to how EdgeQL and EdgeDB leverage Postgres. " + "content": "as to how EdgeQL and EdgeDB leverage Postgres. " }, { "from": 46.12107500000054, "to": 48.49845000000054, "location": 2, - "First Schema mapping." + "content": "First Schema mapping." }, { "from": 48.49845000000054, "to": 51.40135000000017, "location": 2, - "How we map our notion of schema, " + "content": "How we map our notion of schema, " }, { "from": 51.40135000000017, "to": 53.903850000000176, "location": 2, - "which has been discussed a bunch in previous talks, " + "content": "which has been discussed a bunch in previous talks, " }, { "from": 53.903850000000176, "to": 56.406350000000174, "location": 2, - "onto a PostgreSQL schema. " + "content": "onto a PostgreSQL schema. " }, { "from": 56.45640000000036, "to": 58.85879999999999, "location": 2, - "I'm going to talk about query compilation, " + "content": "I'm going to talk about query compilation, " }, { "from": 58.85879999999999, "to": 62.53747500000017, "location": 2, - "how we take an EdgeQL query and turn it into a PostgreSQL query." + "content": "how we take an EdgeQL query and turn it into a PostgreSQL query." }, { "from": 62.53747500000017, "to": 64.76470000000053, "location": 2, - " I'm gonna talk about uh why Postgres," + "content": " I'm gonna talk about uh why Postgres," }, { "from": 64.76470000000053, "to": 69.66331872500044, "location": 2, - "why did we build this on Postgres instead of uh on MySQL" + "content": "why did we build this on Postgres instead of uh on MySQL" }, { "from": 69.67917556600081, "to": 75.35027500000035, "location": 2, - " or SQL Server or Oracle or Mongo or something." + "content": " or SQL Server or Oracle or Mongo or something." }, { "from": 75.77570000000054, "to": 80.53045000000053, "location": 2, - "So first schema mapping uh." + "content": "So first schema mapping uh." }, { "from": 80.53045000000053, "to": 83.258175, "location": 2, - "The... the heart of it is types. " + "content": "The... the heart of it is types. " }, { "from": 83.258175, "to": 87.78770000000053, "location": 2, - "Uh the heart of EdgeDB databases are object types, " + "content": "Uh the heart of EdgeDB databases are object types, " }, { "from": 87.78770000000053, "to": 90.99110320299995, "location": 2, - "and every object type is represented with a SQL table." + "content": "and every object type is represented with a SQL table." }, { "from": 90.99110320300086, "to": 95.87077500000126, "location": 2, - "For every object type in your schema we'll create a PostgreSQL table." + "content": "For every object type in your schema we'll create a PostgreSQL table." }, { "from": 95.87077500000035, "to": 99.77467499999999, "location": 2, - "But just that's not that interesting. We want to talk about what goes into that table. " + "content": "But just that's not that interesting. We want to talk about what goes into that table. " }, { "from": 99.77467499999999, "to": 103.85375000000072, "location": 2, - "So like we talked about, one thing that goes into all of them is an id field, " + "content": "So like we talked about, one thing that goes into all of them is an id field, " }, { "from": 103.85375000000072, "to": 106.20530520600057, "location": 2, - "but on top of that we want to put in all of" + "content": "but on top of that we want to put in all of" }, { "from": 106.20530520600057, "to": 109.15904999999998, "location": 2, - "the data that was declared in the schema. " + "content": "the data that was declared in the schema. " }, { "from": 109.15904999999998, "to": 112.43732500000053, "location": 2, - " So the most basic sort of data that might be on an object" + "content": " So the most basic sort of data that might be on an object" }, { "from": 112.43732500000053, "to": 118.29317499999999, "location": 2, - "is a single link or a single property that points to 0 or 1 of something else. " + "content": "is a single link or a single property that points to 0 or 1 of something else. " }, { "from": 118.29317499999999, "to": 122.74762500000071, "location": 2, - "And this is mapped into Postgres in a pretty obvious way." + "content": "And this is mapped into Postgres in a pretty obvious way." }, { "from": 122.74762500000071, "to": 126.95182500000053, "location": 2, - " Every single property on an EdgeDB object" + "content": " Every single property on an EdgeDB object" }, { "from": 126.95182500000053, "to": 129.85472500000017, "location": 2, - "maps to just a column in the SQL table. " + "content": "maps to just a column in the SQL table. " }, { "from": 129.85472500000017, "to": 134.88475000000074, "location": 2, - "So if we have a property name that holds a string, " + "content": "So if we have a property name that holds a string, " }, { "from": 134.88475000000074, "to": 138.4383, "location": 2, - "that's just a text column in the SQL table." + "content": "that's just a text column in the SQL table." }, { "from": 138.4383, "to": 142.18944840100053, "location": 2, - " Links are very slightly more interesting." + "content": " Links are very slightly more interesting." }, { "from": 142.18944840100053, "to": 148.823675, "location": 2, - "Because we represent links by storing the UUID of the object that's pointed to." + "content": "Because we represent links by storing the UUID of the object that's pointed to." }, { "from": 148.823675, "to": 151.85170000000053, "location": 2, - " So it's just a UUID column. Uh..." + "content": " So it's just a UUID column. Uh..." }, { "from": 151.85170000000053, "to": 155.330175, "location": 2, - "In this case, it's a required link, so it's marked as not null. " + "content": "In this case, it's a required link, so it's marked as not null. " }, { "from": 155.330175, "to": 160.21005, "location": 2, - "The most interesting part of this is actually something that isn't here. " + "content": "The most interesting part of this is actually something that isn't here. " }, { "from": 160.21005, "to": 163.38822500000018, "location": 2, - "You might be used to, in some of your SQL schemas," + "content": "You might be used to, in some of your SQL schemas," }, { "from": 163.38822500000018, "to": 167.2585894980005, "location": 2, - "having a foreign key specified here saying that" + "content": "having a foreign key specified here saying that" }, { "from": 167.28361449800013, "to": 171.87170000000054, "location": 2, - " this is a foreign key referencing the primary key of some other table Foo." + "content": " this is a foreign key referencing the primary key of some other table Foo." }, { "from": 171.87170000000054, "to": 175.70052500000037, "location": 2, - "Uh we don't use that here because we don't need to. " + "content": "Uh we don't use that here because we don't need to. " }, { "from": 175.70052500000037, "to": 182.43637712300043, "location": 2, - "Uh EdgeQL queries, by construction, can't have... can't insert or update" + "content": "Uh EdgeQL queries, by construction, can't have... can't insert or update" }, { "from": 182.45988660900048, "to": 187.46488660900047, "location": 2, - " to a... to point to an object that doesn't exist." + "content": " to a... to point to an object that doesn't exist." }, { "from": 187.52742808800065, "to": 192.21702500000035, "location": 2, - "And so we don't need to use foreign keys to ensure consistency. " + "content": "And so we don't need to use foreign keys to ensure consistency. " }, { "from": 192.21702500000035, "to": 195.79560000000018, "location": 2, - "Because it's ensured by the type checker, by the query compilation," + "content": "Because it's ensured by the type checker, by the query compilation," }, { "from": 195.79560000000018, "to": 197.6329375020001, "location": 2, - " by the entire construction of it." + "content": " by the entire construction of it." }, { "from": 197.6329375020001, "to": 199.98528750200043, "location": 2, - "And so we get a little performance out of that. " + "content": "And so we get a little performance out of that. " }, { "from": 199.98528750200043, "to": 202.67747500000016, "location": 2, - "Uh in this example there's one fib I'm telling:" + "content": "Uh in this example there's one fib I'm telling:" }, { "from": 202.67747500000016, "to": 207.68247500000018, "location": 2, - "the column names here... I've written nice column names, uh" + "content": "the column names here... I've written nice column names, uh" }, { "from": 207.76008052799997, "to": 211.7115000000007, "location": 2, - "in the actual implementation, column names are unreadable " + "content": "in the actual implementation, column names are unreadable " }, { "from": 211.7115000000007, "to": 215.29007500000054, "location": 2, - "machine generated things for technical reasons. " + "content": "machine generated things for technical reasons. " }, { "from": 215.29007500000054, "to": 221.19597500000017, "location": 2, - "Uh a little more interesting than single links and single properties though are muti-links. " + "content": "Uh a little more interesting than single links and single properties though are muti-links. " }, { "from": 221.19597500000017, "to": 226.4762500000007, "location": 2, - "And this is because, like a good SQL.. a good relational database " + "content": "And this is because, like a good SQL.. a good relational database " }, { "from": 226.4762500000007, "to": 228.67845000000054, "location": 2, - "that stores things in normalized form, " + "content": "that stores things in normalized form, " }, { "from": 228.67845000000054, "to": 234.35912500000072, "location": 2, - "we don't want to store... multiple links in a single table row. " + "content": "we don't want to store... multiple links in a single table row. " }, { "from": 234.35912500000072, "to": 236.38615000000036, "location": 2, - "That's not the relational way. " + "content": "That's not the relational way. " }, { "from": 236.38615000000036, "to": 237.71247500000015, "location": 2, - "The way you're supposed to do it," + "content": "The way you're supposed to do it," }, { "from": 237.71247500000015, "to": 239.81457500000053, "location": 2, - "the way that Postgres is optimized for doing it," + "content": "the way that Postgres is optimized for doing it," }, { "from": 239.81457500000053, "to": 245.69545000000053, "location": 2, - " is to create a link table, a separate table that maps as a relation between" + "content": " is to create a link table, a separate table that maps as a relation between" }, { "from": 245.69545000000053, "to": 248.54829999999998, "location": 2, - "the source of a multi-link and the things that it's pointing to." + "content": "the source of a multi-link and the things that it's pointing to." }, { "from": 248.67342499999998, "to": 250.83601442900047, "location": 2, - "And so when you declare a multi-link like this, " + "content": "And so when you declare a multi-link like this, " }, { "from": 250.83601442900047, "to": 254.80454999999998, "location": 2, - "we will create a link table that has a source and a target field," + "content": "we will create a link table that has a source and a target field," }, { "from": 254.80454999999998, "to": 258.115661804, "location": 2, - " from... from the source of the link to the targets of the link." + "content": " from... from the source of the link to the targets of the link." }, { "from": 258.1790010800008, "to": 260.03477500000037, "location": 2, - "We put a unique constraint on it, " + "content": "We put a unique constraint on it, " }, { "from": 260.03477500000037, "to": 263.8385750000005, "location": 2, - "because all the links are unique and that helps drive an index." + "content": "because all the links are unique and that helps drive an index." }, { "from": 263.8385750000005, "to": 267.7675000000007, "location": 2, - "And we also add a reverse index here on the target" + "content": "And we also add a reverse index here on the target" }, { "from": 267.7675000000007, "to": 273.25963364700044, "location": 2, - "so that you can go from targets to sources using EdgeQL backlinks." + "content": "so that you can go from targets to sources using EdgeQL backlinks." }, { "from": 274.4742000000005, "to": 276.77650000000074, "location": 2, - "Uh." + "content": "Uh." }, { "from": 276.77650000000074, "to": 279.4041250000007, "location": 2, - "There are a few other things that we do in the schema." + "content": "There are a few other things that we do in the schema." }, { "from": 279.42915000000033, "to": 281.84261305200073, "location": 2, - "And all of them are mostly pretty straightforward." + "content": "And all of them are mostly pretty straightforward." }, { "from": 281.84261305200073, "to": 286.9037871700011, "location": 2, - "Indexes in EdgeQL are unsurprisingly realized as indexes in PostgreSQL." + "content": "Indexes in EdgeQL are unsurprisingly realized as indexes in PostgreSQL." }, { "from": 286.9037871700002, "to": 289.63935000000015, "location": 2, - "Constraints are Postgres constraints." + "content": "Constraints are Postgres constraints." }, { "from": 289.63935000000015, "to": 295.62032500000055, "location": 2, - "Uh custom scalar types uh are SQL domain types or Postgres domain types. " + "content": "Uh custom scalar types uh are SQL domain types or Postgres domain types. " }, { "from": 295.62032500000055, "to": 298.72342499999996, "location": 2, - "Uh type inheritance is a little bit more interesting. " + "content": "Uh type inheritance is a little bit more interesting. " }, { "from": 298.72342499999996, "to": 301.90160000000014, "location": 2, - "So if you remember from our example Netflix schema," + "content": "So if you remember from our example Netflix schema," }, { "from": 301.90160000000014, "to": 307.1126368310004, "location": 2, - "we have a Content abstract type that has descendants - TV Show and Movies," + "content": "we have a Content abstract type that has descendants - TV Show and Movies," }, { "from": 307.14964780500003, "to": 310.3100000000007, "location": 2, - "and you can select content and get data from that. " + "content": "and you can select content and get data from that. " }, { "from": 310.3528468040004, "to": 313.8135000000007, "location": 2, - "Uh the way we implement that is we create a Postgres View " + "content": "Uh the way we implement that is we create a Postgres View " }, { "from": 313.8135000000007, "to": 316.0407250000002, "location": 2, - "that is a union of all its descendants, " + "content": "that is a union of all its descendants, " }, { "from": 316.0407250000002, "to": 322.2178869910001, "location": 2, - "so we have a View for Content that unions together the tables for " + "content": "so we have a View for Content that unions together the tables for " }, { "from": 322.2619359960008, "to": 328.77845000000053, "location": 2, - "TV Show and Movie, including all of the columns that are included in Content." + "content": "TV Show and Movie, including all of the columns that are included in Content." }, { "from": 328.77845000000053, "to": 331.255925, "location": 2, - "Uh, that handles things for the select side." + "content": "Uh, that handles things for the select side." }, { "from": 331.255925, "to": 334.85952500000036, "location": 2, - "When you're doing inserts or when you're doing updates uh and deletes," + "content": "When you're doing inserts or when you're doing updates uh and deletes," }, { "from": 334.85952500000036, "to": 337.43710000000016, "location": 2, - "which can update or delete things from multiple ones," + "content": "which can update or delete things from multiple ones," }, { "from": 337.43710000000016, "to": 341.9666250000007, "location": 2, - "uh, the View doesn't help us and we need to do some actual work on the compiler side" + "content": "uh, the View doesn't help us and we need to do some actual work on the compiler side" }, { "from": 341.9666250000007, "to": 345.77042199700077, "location": 2, - "but the key idea is we use a View for most of the important queries." + "content": "but the key idea is we use a View for most of the important queries." }, { "from": 345.77042199700077, "to": 351.57622500000014, "location": 2, - "So that covers basically all of the details, or all of the most interesting details," + "content": "So that covers basically all of the details, or all of the most interesting details," }, { "from": 351.57622500000014, "to": 354.4791250000007, "location": 2, - "about how... things go into the schema." + "content": "about how... things go into the schema." }, { "from": 354.4791250000007, "to": 357.0066500000003, "location": 2, - "And so now we're gonna talk a bit about how..." + "content": "And so now we're gonna talk a bit about how..." }, { "from": 357.0066500000003, "to": 360.51015000000035, "location": 2, - "we go from an EdgeQL query to a PostgreSQL query." + "content": "we go from an EdgeQL query to a PostgreSQL query." }, { "from": 360.51015000000035, "to": 366.41605, "location": 2, - "Uh, and the compiler is built in a fairly traditional sort of multi-stage step." + "content": "Uh, and the compiler is built in a fairly traditional sort of multi-stage step." }, { "from": 366.41605, "to": 369.64427500000033, "location": 2, - "Uh, I guess I'm fibbing a little here, and that I've written two phases." + "content": "Uh, I guess I'm fibbing a little here, and that I've written two phases." }, { "from": 369.64427500000033, "to": 376.22585000000015, "location": 2, - "There's really a phase before it which takes the... textual string of EdgeQL," + "content": "There's really a phase before it which takes the... textual string of EdgeQL," }, { "from": 376.2627688820005, "to": 380.60522500000013, "location": 2, - "and lexes and parses it into EdgeQL AST." + "content": "and lexes and parses it into EdgeQL AST." }, { "from": 380.64214288100015, "to": 383.4580750000005, "location": 2, - "And that's like the first third of any book on compilers, " + "content": "And that's like the first third of any book on compilers, " }, { "from": 383.4580750000005, "to": 385.81042499999995, "location": 2, - "and I just sort of forgot to put it on the phase list," + "content": "and I just sort of forgot to put it on the phase list," }, { "from": 385.8354500000005, "to": 390.1397500000007, "location": 2, - "because it's also by far the least interesting part about writing... a compiler." + "content": "because it's also by far the least interesting part about writing... a compiler." }, { "from": 390.1397500000007, "to": 393.41802500000034, "location": 2, - "Even though we actually did some interesting stuff on that side, " + "content": "Even though we actually did some interesting stuff on that side, " }, { "from": 393.41802500000034, "to": 396.44604999999996, "location": 2, - "that custom Python parser generator." + "content": "that custom Python parser generator." }, { "from": 396.5211250000007, "to": 399.6492500000007, "location": 2, - "But, the two main phases as I think about them are " + "content": "But, the two main phases as I think about them are " }, { "from": 399.6492500000007, "to": 403.55315000000036, "location": 2, - "an EdgeQL to intermediate representation phase, " + "content": "an EdgeQL to intermediate representation phase, " }, { "from": 403.55315000000036, "to": 407.13172500000013, "location": 2, - "where we compile to uh intermediate representation for our queries " + "content": "where we compile to uh intermediate representation for our queries " }, { "from": 407.14764090000045, "to": 411.1607500000007, "location": 2, - "that represents data... represents the query in a more simple way," + "content": "that represents data... represents the query in a more simple way," }, { "from": 411.1607500000007, "to": 415.51510000000013, "location": 2, - "and then an intermediate representation to SQL... phase." + "content": "and then an intermediate representation to SQL... phase." }, { "from": 415.5560409000001, "to": 418.76835000000017, "location": 2, - "And we actually have another phase in front of all of that," + "content": "And we actually have another phase in front of all of that," }, { "from": 418.76835000000017, "to": 421.8714500000005, "location": 2, - "for the GraphQL frontend we touched on a bit," + "content": "for the GraphQL frontend we touched on a bit," }, { "from": 421.8714500000005, "to": 425.22479999999996, "location": 2, - "where we will convert from GraphQL to EdgeQL," + "content": "where we will convert from GraphQL to EdgeQL," }, { "from": 425.22479999999996, "to": 428.8033750000007, "location": 2, - "uh which is another place where we're using, in addition to the query builder, " + "content": "uh which is another place where we're using, in addition to the query builder, " }, { "from": 428.8033750000007, "to": 431.85642499999994, "location": 2, - "EdgeQL as a target language, and having it work pretty well." + "content": "EdgeQL as a target language, and having it work pretty well." }, { "from": 431.85642499999994, "to": 434.63420000000053, "location": 2, - "But, so now I'm gonna dive into some of the actual parts" + "content": "But, so now I'm gonna dive into some of the actual parts" }, { "from": 434.63420000000053, "to": 438.8384000000003, "location": 2, - " of the EdgeQL to intermediate representation... step." + "content": " of the EdgeQL to intermediate representation... step." }, { "from": 438.8384000000003, "to": 444.59415000000035, "location": 2, - "One of... the sort of first and most core bits is name resolution." + "content": "One of... the sort of first and most core bits is name resolution." }, { "from": 444.6490388339999, "to": 448.2478, "location": 2, - "We have a query on the left and a schema that it's writing... " + "content": "We have a query on the left and a schema that it's writing... " }, { "from": 448.2478, "to": 449.7743250000005, "location": 2, - "that it's referring to on the right," + "content": "that it's referring to on the right," }, { "from": 449.7743250000005, "to": 453.8030236740007, "location": 2, - "and we need to figure out what each of the names actually refers to." + "content": "and we need to figure out what each of the names actually refers to." }, { "from": 453.8030236740007, "to": 460.05960000000016, "location": 2, - "The query on the left is... a very simplified version of the Netflix content Movie schema," + "content": "The query on the left is... a very simplified version of the Netflix content Movie schema," }, { "from": 460.05960000000016, "to": 465.06460000000015, "location": 2, - "with just movies and persons, uh and title renamed to name" + "content": "with just movies and persons, uh and title renamed to name" }, { "from": 465.06460000000015, "to": 469.143675, "location": 2, - "for reasons I'll get into a... in a minute, for explanatory purposes." + "content": "for reasons I'll get into a... in a minute, for explanatory purposes." }, { "from": 469.143675, "to": 471.9715000000007, "location": 2, - "Uh so if we run through name resolution," + "content": "Uh so if we run through name resolution," }, { "from": 471.9715000000007, "to": 476.400925, "location": 2, - "we quickly figure out that Movie refers to uh the type Movie," + "content": "we quickly figure out that Movie refers to uh the type Movie," }, { "from": 476.400925, "to": 478.90342499999997, "location": 2, - "uh actors refers to that link actors," + "content": "uh actors refers to that link actors," }, { "from": 478.90342499999997, "to": 484.33385000000015, "location": 2, - "the name on actors refers to the name that's a property in Person," + "content": "the name on actors refers to the name that's a property in Person," }, { "from": 484.33385000000015, "to": 490.665175, "location": 2, - "and then the name at the bottom of the whole query refers to... uh the property name." + "content": "and then the name at the bottom of the whole query refers to... uh the property name." }, { "from": 490.665175, "to": 494.4940000000007, "location": 2, - "This is all pretty straightforward, except for the one interesting bit," + "content": "This is all pretty straightforward, except for the one interesting bit," }, { "from": 494.4940000000007, "to": 497.5220250000003, "location": 2, - "which is how... those names got resolved," + "content": "which is how... those names got resolved," }, { "from": 497.5220250000003, "to": 501.4509500000005, "location": 2, - "and that ties into another bit that runs basically in parallel " + "content": "and that ties into another bit that runs basically in parallel " }, { "from": 501.4509500000005, "to": 505.42992499999997, "location": 2, - "and very interdependent with name resolution of type resolution." + "content": "and very interdependent with name resolution of type resolution." }, { "from": 505.45607512399994, "to": 509.2587500000007, "location": 2, - "And so this is also... uh pretty straightforward to understand." + "content": "And so this is also... uh pretty straightforward to understand." }, { "from": 509.2587500000007, "to": 514.2637500000006, "location": 2, - "As we're doing it we figure out that Movie refers a Movie, actors refers to a Person." + "content": "As we're doing it we figure out that Movie refers a Movie, actors refers to a Person." }, { "from": 514.2637500000006, "to": 516.991475, "location": 2, - "And then because we know that actors refers to a Person, " + "content": "And then because we know that actors refers to a Person, " }, { "from": 516.991475, "to": 521.2957750000003, "location": 2, - "that allows us to do the name resolution on that name in its shape," + "content": "that allows us to do the name resolution on that name in its shape," }, { "from": 521.2957750000003, "to": 523.0225000000006, "location": 2, - "and figure out that name is a str." + "content": "and figure out that name is a str." }, { "from": 523.0225000000006, "to": 526.4008750000006, "location": 2, - "And similarly this other name... also a str." + "content": "And similarly this other name... also a str." }, { "from": 526.4008750000006, "to": 529.8543250000005, "location": 2, - "Uh the literal Dune, unsurprisingly is a str." + "content": "Uh the literal Dune, unsurprisingly is a str." }, { "from": 529.8543250000005, "to": 533.257725, "location": 2, - "Uh and then since we have to do this for all the pieces," + "content": "Uh and then since we have to do this for all the pieces," }, { "from": 533.257725, "to": 534.7091749999998, "location": 2, - "in order to verify everything," + "content": "in order to verify everything," }, { "from": 534.7091749999998, "to": 538.5936776220004, "location": 2, - "uh you know that... that whole expression in the filter is a bool." + "content": "uh you know that... that whole expression in the filter is a bool." }, { "from": 538.5936776220004, "to": 546.8462999999999, "location": 2, - "And... the... most interesting or useful part about this from a... user's perspective" + "content": "And... the... most interesting or useful part about this from a... user's perspective" }, { "from": 546.8462999999999, "to": 551.8512999999999, "location": 2, - "is that all of this type information, the types of all of the fields in these shapes," + "content": "is that all of this type information, the types of all of the fields in these shapes," }, { "from": 551.881949619, "to": 557.3567999999999, "location": 2, - "that actors as a Person, and that sub shape contains a thing name with a str," + "content": "that actors as a Person, and that sub shape contains a thing name with a str," }, { "from": 557.3567999999999, "to": 561.3107500000007, "location": 2, - "all of that gets returned to the client if you're using the binary protocol." + "content": "all of that gets returned to the client if you're using the binary protocol." }, { "from": 561.3107500000007, "to": 566.0404750000001, "location": 2, - "And so our clients are able to get a very rich understanding of the data," + "content": "And so our clients are able to get a very rich understanding of the data," }, { "from": 566.0404750000001, "to": 570.1445750000005, "location": 2, - "knowing the types of everything... and the names of everything," + "content": "knowing the types of everything... and the names of everything," }, { "from": 570.1445750000005, "to": 575.2496749999999, "location": 2, - "and can provide a very idiomatic interface in their languages." + "content": "and can provide a very idiomatic interface in their languages." }, { "from": 575.2496749999999, "to": 578.8032250000001, "location": 2, - "In Python, even without knowing any of the type information in advance," + "content": "In Python, even without knowing any of the type information in advance," }, { "from": 578.8032250000001, "to": 581.7061250000006, "location": 2, - "uh we get all of the things in the right type," + "content": "uh we get all of the things in the right type," }, { "from": 581.7061250000006, "to": 588.0875000000007, "location": 2, - "and... can, you know, provide access just with dot access and everything like that." + "content": "and... can, you know, provide access just with dot access and everything like that." }, { "from": 588.0875000000007, "to": 592.0915000000006, "location": 2, - "And a lot of other database clients make it much harder " + "content": "And a lot of other database clients make it much harder " }, { "from": 592.0915000000006, "to": 596.2932095120003, "location": 2, - "if you want to have the type information." + "content": "if you want to have the type information." }, { "from": 596.3707750000002, "to": 599.5990000000006, "location": 2, - "Uh, we also do cardinality inference, " + "content": "Uh, we also do cardinality inference, " }, { "from": 599.5990000000006, "to": 603.7531500000002, "location": 2, - "where everything in the query we figure out how many objects it might return." + "content": "where everything in the query we figure out how many objects it might return." }, { "from": 603.7531500000002, "to": 609.2836749999999, "location": 2, - "So here Movie, because Movie is a... object that's just a table," + "content": "So here Movie, because Movie is a... object that's just a table," }, { "from": 609.2836749999999, "to": 613.3377250000001, "location": 2, - "it could be an empty table, it could have one element, it could have a million." + "content": "it could be an empty table, it could have one element, it could have a million." }, { "from": 613.3377250000001, "to": 616.5659500000004, "location": 2, - "We infer the cardinality as MANY, and MANY means it could be anything." + "content": "We infer the cardinality as MANY, and MANY means it could be anything." }, { "from": 616.5659500000004, "to": 619.8192000000005, "location": 2, - "It could be 0, it could be infinite, not infinite." + "content": "It could be 0, it could be infinite, not infinite." }, { "from": 619.8192000000005, "to": 624.9296793740002, "location": 2, - "Uh, actors, because it's just a multi-link, also has cardinality MANY." + "content": "Uh, actors, because it's just a multi-link, also has cardinality MANY." }, { "from": 624.9296793740002, "to": 632.0814500000005, "location": 2, - "Um and then... uh name, because it's a single property, " + "content": "Um and then... uh name, because it's a single property, " }, { "from": 632.0814500000005, "to": 636.5359000000002, "location": 2, - "uh and a single required property, it has cardinality ONE." + "content": "uh and a single required property, it has cardinality ONE." }, { "from": 636.5359000000002, "to": 639.0634249999999, "location": 2, - "Uh if it was single but not required, " + "content": "Uh if it was single but not required, " }, { "from": 639.0634249999999, "to": 641.1905499999999, "location": 2, - "it would have a different cardinality - AT_MOST_ONE," + "content": "it would have a different cardinality - AT_MOST_ONE," }, { "from": 641.1905499999999, "to": 643.7681250000006, "location": 2, - " which means that it could be empty." + "content": " which means that it could be empty." }, { "from": 643.7681250000006, "to": 648.7731250000006, "location": 2, - "Uh, we also know that name is ONE, because it's a required single property." + "content": "Uh, we also know that name is ONE, because it's a required single property." }, { "from": 648.7731250000006, "to": 655.00435, "location": 2, - "And the literal Dune also has cardinality ONE, because it's a literal string." + "content": "And the literal Dune also has cardinality ONE, because it's a literal string." }, { "from": 655.00435, "to": 659.1835250000003, "location": 2, - "Uh, but then the most interesting part about this is that" + "content": "Uh, but then the most interesting part about this is that" }, { "from": 659.1835250000003, "to": 664.638975000001, "location": 2, - "we also... because we've done this filter on an exclusively constrained name," + "content": "we also... because we've done this filter on an exclusively constrained name," }, { "from": 664.638975000001, "to": 667.5418750000006, "location": 2, - "because uh in this example each movie... " + "content": "because uh in this example each movie... " }, { "from": 667.5418750000006, "to": 670.269600000001, "location": 2, - "we can only have uh one movie with each name." + "content": "we can only have uh one movie with each name." }, { "from": 670.269600000001, "to": 672.646975000001, "location": 2, - "So there can only be one Dune." + "content": "So there can only be one Dune." }, { "from": 672.646975000001, "to": 675.0994249999999, "location": 2, - "Which obviously is a little counterfactual," + "content": "Which obviously is a little counterfactual," }, { "from": 675.0994249999999, "to": 680.1044249999999, "location": 2, - "there are several Dunes, and... maybe only one worth having." + "content": "there are several Dunes, and... maybe only one worth having." }, { "from": 680.1044249999999, "to": 685.4347500000006, "location": 2, - "Um, we can infer that the cardinality of the entire thing is AT_MOST_ONE." + "content": "Um, we can infer that the cardinality of the entire thing is AT_MOST_ONE." }, { "from": 685.4347500000006, "to": 688.2125250000003, "location": 2, - "It may be empty, but it can't be more than one." + "content": "It may be empty, but it can't be more than one." }, { "from": 688.2125250000003, "to": 691.6910000000006, "location": 2, - "Because... uh name is an exclusive constraint." + "content": "Because... uh name is an exclusive constraint." }, { "from": 691.6910000000006, "to": 698.172475000001, "location": 2, - "Uh, and all of this cardinality inference is used to drive the compilation a little." + "content": "Uh, and all of this cardinality inference is used to drive the compilation a little." }, { "from": 698.172475000001, "to": 700.925225000001, "location": 2, - "And the output format and is returned to the client," + "content": "And the output format and is returned to the client," }, { "from": 700.925225000001, "to": 703.6279249999999, "location": 2, - "so it knows whether there's only one result," + "content": "so it knows whether there's only one result," }, { "from": 703.6279249999999, "to": 708.6329249999999, "location": 2, - "it knows... for each of the fields, how many things can be there." + "content": "it knows... for each of the fields, how many things can be there." }, { "from": 708.6579389889994, "to": 712.5868750000006, "location": 2, - "Um, there're a few other things we do. One is uh scope tree inference." + "content": "Um, there're a few other things we do. One is uh scope tree inference." }, { "from": 712.5868750000006, "to": 715.2318963790015, "location": 2, - "Uh this is not gonna be on the TAST," + "content": "Uh this is not gonna be on the TAST," }, { "from": 715.2318963790015, "to": 720.2368963790015, "location": 2, - "but core to the semantics of EdgeDB, on a sort of theoretical semantics level," + "content": "but core to the semantics of EdgeDB, on a sort of theoretical semantics level," }, { "from": 720.2368963790015, "to": 724.2235000000006, "location": 2, - " is that when we have a common path reference uh in a query, " + "content": " is that when we have a common path reference uh in a query, " }, { "from": 724.2235000000006, "to": 726.7760499999998, "location": 2, - "like movie being referred to in two places here," + "content": "like movie being referred to in two places here," }, { "from": 726.7760499999998, "to": 730.8050749999995, "location": 2, - "unless they're all in aggregates, uh it gets hoisted out." + "content": "unless they're all in aggregates, uh it gets hoisted out." }, { "from": 730.8050749999995, "to": 735.4847500000006, "location": 2, - "Uh, there's some discussion of this idea in a different form on our website," + "content": "Uh, there's some discussion of this idea in a different form on our website," }, { "from": 735.4847500000006, "to": 738.6128750000006, "location": 2, - "but again, it really won't be on the TAST." + "content": "but again, it really won't be on the TAST." }, { "from": 738.6128750000006, "to": 742.091350000001, "location": 2, - "Um, more interesting maybe is we do a lot of converting" + "content": "Um, more interesting maybe is we do a lot of converting" }, { "from": 742.091350000001, "to": 745.6949499999995, "location": 2, - "complex constructs to more primitive ones." + "content": "complex constructs to more primitive ones." }, { "from": 745.6949499999995, "to": 748.7767006719992, "location": 2, - "Uh, for example, if we have an array of integers, " + "content": "Uh, for example, if we have an array of integers, " }, { "from": 748.7767006719992, "to": 751.725975000001, "location": 2, - "and we want to cast it to an array of strings." + "content": "and we want to cast it to an array of strings." }, { "from": 751.725975000001, "to": 755.5297750000002, "location": 2, - "Uh, Postgres doesn't have a way to do that all at once." + "content": "Uh, Postgres doesn't have a way to do that all at once." }, { "from": 755.5297750000002, "to": 760.0592999999999, "location": 2, - "So we have to unpack the array into a set, uh, cast the individual elements," + "content": "So we have to unpack the array into a set, uh, cast the individual elements," }, { "from": 760.0592999999999, "to": 762.9371749999999, "location": 2, - " and then array_agg and get back into an array." + "content": " and then array_agg and get back into an array." }, { "from": 762.9371749999999, "to": 766.4406749999998, "location": 2, - "Uh, maybe more useful is let's say we have a JSON query argument," + "content": "Uh, maybe more useful is let's say we have a JSON query argument," }, { "from": 766.4406749999998, "to": 771.0452750000003, "location": 2, - "and want that... that represents JSON dictionaries or JSON objects" + "content": "and want that... that represents JSON dictionaries or JSON objects" }, { "from": 771.0452750000003, "to": 772.9471749999999, "location": 2, - "that have a name and an age field," + "content": "that have a name and an age field," }, { "from": 772.9471749999999, "to": 775.1744000000002, "location": 2, - "and we want to cast that into a named tuple." + "content": "and we want to cast that into a named tuple." }, { "from": 775.1744000000002, "to": 778.9781999999996, "location": 2, - "Uh, we translate that into code that calls json_get" + "content": "Uh, we translate that into code that calls json_get" }, { "from": 778.9781999999996, "to": 782.9071250000006, "location": 2, - "with the different fields we're trying to access and then does the appropriate cast," + "content": "with the different fields we're trying to access and then does the appropriate cast," }, { "from": 782.9071250000006, "to": 786.1854000000002, "location": 2, - "so name goes to str and age goes to int64." + "content": "so name goes to str and age goes to int64." }, { "from": 786.1854000000002, "to": 789.013225000001, "location": 2, - "Uh, and a bunch of other stuff lives in this too." + "content": "Uh, and a bunch of other stuff lives in this too." }, { "from": 789.013225000001, "to": 793.4176250000006, "location": 2, - "Uh, we resolve overloaded functions to which of the particular overloads it might be." + "content": "Uh, we resolve overloaded functions to which of the particular overloads it might be." }, { "from": 793.4176250000006, "to": 797.7469499999995, "location": 2, - "We inline the code for computed properties and links." + "content": "We inline the code for computed properties and links." }, { "from": 797.7469499999995, "to": 803.1273249999995, "location": 2, - "We insert implicit limits and type name computations into the queries from the CLI." + "content": "We insert implicit limits and type name computations into the queries from the CLI." }, { "from": 803.1273249999995, "to": 805.5046999999995, "location": 2, - "When you're doing CLI there's usually an implicit limit," + "content": "When you're doing CLI there's usually an implicit limit," }, { "from": 805.5046999999995, "to": 806.9811749999999, "location": 2, - "so you don't get overwhelmed with data." + "content": "so you don't get overwhelmed with data." }, { "from": 806.9811749999999, "to": 809.7339249999999, "location": 2, - "And we insert type names into the objects we returned" + "content": "And we insert type names into the objects we returned" }, { "from": 809.7339249999999, "to": 812.8120000000006, "location": 2, - " to provide more useful... results." + "content": " to provide more useful... results." }, { "from": 812.8120000000006, "to": 814.6137999999999, "location": 2, - "And most of our error checking lives here." + "content": "And most of our error checking lives here." }, { "from": 814.6137999999999, "to": 816.8160000000006, "location": 2, - "Because the earlier in the pipeline it lives, " + "content": "Because the earlier in the pipeline it lives, " }, { "from": 816.8160000000006, "to": 823.7229000000002, "location": 2, - "the... better... source uh information we can give about where the problem came from." + "content": "the... better... source uh information we can give about where the problem came from." }, { "from": 823.7229000000002, "to": 831.1030888159994, "location": 2, - "Uh, next, after that we have to compile from the intermediate representation to SQL." + "content": "Uh, next, after that we have to compile from the intermediate representation to SQL." }, { "from": 831.1030888159994, "to": 835.2093750000006, "location": 2, - "Uh, and so we generate that SQL based on the intermediate representation" + "content": "Uh, and so we generate that SQL based on the intermediate representation" }, { "from": 835.2093750000006, "to": 838.7629249999999, "location": 2, - "and this scope tree that we've built that represents that..." + "content": "and this scope tree that we've built that represents that..." }, { "from": 838.8358078099996, "to": 843.3425000000005, "location": 2, - "um not on the TAST, lifting of common path references." + "content": "um not on the TAST, lifting of common path references." }, { "from": 843.3425000000005, "to": 847.821975000001, "location": 2, - "Um, and, the compilers actually structured in a kind of interesting way." + "content": "Um, and, the compilers actually structured in a kind of interesting way." }, { "from": 847.821975000001, "to": 851.0251749999999, "location": 2, - "We build the query in a way that I will call semi-lazily." + "content": "We build the query in a way that I will call semi-lazily." }, { "from": 851.0251749999999, "to": 855.6297750000002, "location": 2, - "In which um, you have uh, when you have stuff like a..." + "content": "In which um, you have uh, when you have stuff like a..." }, { "from": 855.6297750000002, "to": 857.5316749999998, "location": 2, - "object reference and then a shape on it," + "content": "object reference and then a shape on it," }, { "from": 857.5316749999998, "to": 859.3334750000009, "location": 2, - "when we go down to compile the object, " + "content": "when we go down to compile the object, " }, { "from": 859.3334750000009, "to": 863.2874249999999, "location": 2, - "we generate code that joins in a subquery that joins in the tables being accessed," + "content": "we generate code that joins in a subquery that joins in the tables being accessed," }, { "from": 863.2874249999999, "to": 865.9651000000009, "location": 2, - "but doesn't add any column accesses to it." + "content": "but doesn't add any column accesses to it." }, { "from": 865.9651000000009, "to": 869.7689000000003, "location": 2, - "And then once we go... to compile the shape," + "content": "And then once we go... to compile the shape," }, { "from": 869.7689000000003, "to": 873.973100000001, "location": 2, - "we see \"oh we're trying to access these things on this relation we grabbed over there, " + "content": "we see \"oh we're trying to access these things on this relation we grabbed over there, " }, { "from": 873.973100000001, "to": 877.4515749999995, "location": 2, - "so now we need to go back in there and add in the column accesses.\"" + "content": "so now we need to go back in there and add in the column accesses.\"" }, { "from": 877.4515749999995, "to": 881.7058249999995, "location": 2, - "That sort of... builds it up and then pulls the data out later." + "content": "That sort of... builds it up and then pulls the data out later." }, { "from": 881.7058249999995, "to": 887.5866999999995, "location": 2, - "And then importantly we serialize all the results into... the appropriate output format." + "content": "And then importantly we serialize all the results into... the appropriate output format." }, { "from": 887.5866999999995, "to": 890.6647750000002, "location": 2, - "Uh, which is a good time to talk about output formats." + "content": "Uh, which is a good time to talk about output formats." }, { "from": 890.6647750000002, "to": 894.3935000000006, "location": 2, - "So the main output format we have is a binary format." + "content": "So the main output format we have is a binary format." }, { "from": 894.3935000000006, "to": 897.2463500000009, "location": 2, - "Our data is returned as native PostgreSQL types." + "content": "Our data is returned as native PostgreSQL types." }, { "from": 897.2463500000009, "to": 903.3024000000003, "location": 2, - "Uh, strs are returned as text. Uh..., int64s are returned as int8s." + "content": "Uh, strs are returned as text. Uh..., int64s are returned as int8s." }, { "from": 903.3024000000003, "to": 906.4805749999995, "location": 2, - "Uh object shapes get returned as tuples." + "content": "Uh object shapes get returned as tuples." }, { "from": 906.4805749999995, "to": 910.0091000000009, "location": 2, - "Um, and properties and links that have multiple elements, " + "content": "Um, and properties and links that have multiple elements, " }, { "from": 910.0091000000009, "to": 913.4625499999999, "location": 2, - "which is one of the core things that we make it easy to do, " + "content": "which is one of the core things that we make it easy to do, " }, { "from": 913.4625499999999, "to": 918.0421250000006, "location": 2, - "um... when you're selecting like the shape of, you know, movie and all the actors," + "content": "um... when you're selecting like the shape of, you know, movie and all the actors," }, { "from": 918.0421250000006, "to": 919.9190000000006, "location": 2, - "that actors field has multiple elements," + "content": "that actors field has multiple elements," }, { "from": 919.9190000000006, "to": 922.9720499999999, "location": 2, - "we represent that as an array which will be an array of tuples here." + "content": "we represent that as an array which will be an array of tuples here." }, { "from": 922.9720499999999, "to": 925.1241999999995, "location": 2, - "Um, and like I touched on before, " + "content": "Um, and like I touched on before, " }, { "from": 925.1241999999995, "to": 929.0281000000009, "location": 2, - "the client is returned a type descriptor describing all this output." + "content": "the client is returned a type descriptor describing all this output." }, { "from": 929.0281000000009, "to": 933.7077750000002, "location": 2, - "Uh, we also importantly have a direct JSON output mode. " + "content": "Uh, we also importantly have a direct JSON output mode. " }, { "from": 933.7077750000002, "to": 939.1882500000006, "location": 2, - "Uh, where instead of this binary format we output all the data directly as JSON." + "content": "Uh, where instead of this binary format we output all the data directly as JSON." }, { "from": 939.1882500000006, "to": 943.1171749999999, "location": 2, - "Uh, this is... less rich from a client perspective." + "content": "Uh, this is... less rich from a client perspective." }, { "from": 943.1171749999999, "to": 947.1211749999999, "location": 2, - "It's... if you're trying to operate on the data from the direct client," + "content": "It's... if you're trying to operate on the data from the direct client," }, { "from": 947.1211749999999, "to": 948.7227750000002, "location": 2, - "it's probably not what you want." + "content": "it's probably not what you want." }, { "from": 948.7227750000002, "to": 951.5005499999999, "location": 2, - "But, if you just want a really simple," + "content": "But, if you just want a really simple," }, { "from": 951.5005499999999, "to": 955.2292750000003, "location": 2, - "if you want to make a query and then return it from an endpoint," + "content": "if you want to make a query and then return it from an endpoint," }, { "from": 955.2547924920009, "to": 958.8579000000002, "location": 2, - "uh, without doing any real server side processing," + "content": "uh, without doing any real server side processing," }, { "from": 958.8579000000002, "to": 961.5105499999999, "location": 2, - "the JSON mode is a really nice fast way to do that." + "content": "the JSON mode is a really nice fast way to do that." }, { "from": 961.5105499999999, "to": 965.2893249999995, "location": 2, - "You... get all the JSON produced efficiently in the database query," + "content": "You... get all the JSON produced efficiently in the database query," }, { "from": 965.2893249999995, "to": 968.2672999999999, "location": 2, - "and don't need to do it on your app server." + "content": "and don't need to do it on your app server." }, { "from": 968.2672999999999, "to": 971.3453750000006, "location": 2, - "Uh, so that let us put sort of this all together." + "content": "Uh, so that let us put sort of this all together." }, { "from": 971.3453750000006, "to": 978.9029249999999, "location": 2, - "Um, with a movie query that.. selects the name and the runtime of a movie," + "content": "Um, with a movie query that.. selects the name and the runtime of a movie," }, { "from": 978.9029249999999, "to": 981.5055250000003, "location": 2, - "and uh the cast and their names." + "content": "and uh the cast and their names." }, { "from": 981.5055250000003, "to": 985.5846000000009, "location": 2, - "And uh, approximately the query on the right is what we get." + "content": "And uh, approximately the query on the right is what we get." }, { "from": 985.5846000000009, "to": 988.9880000000006, "location": 2, - "I... I cleaned it up a little bit, to fit on the slide," + "content": "I... I cleaned it up a little bit, to fit on the slide," }, { "from": 988.9880000000006, "to": 991.0650749999995, "location": 2, - "um, some of the rough edges." + "content": "um, some of the rough edges." }, { "from": 991.0650749999995, "to": 994.093100000001, "location": 2, - "But, the nice thing is even if we generate code with rough edges," + "content": "But, the nice thing is even if we generate code with rough edges," }, { "from": 994.093100000001, "to": 1000.0490499999999, "location": 2, - "conte nt": "Postgres is very good at removing... um things like an extra select around things or.", - "Postgres is very good at removing... um things like an extra select around things or." + "content": "Postgres is very good at removing... um things like an extra select around things or." }, { "from": 1000.0490499999999, "to": 1002.8268249999995, "location": 2, - "Uh, but basically here the idea right is down at the bottom." + "content": "Uh, but basically here the idea right is down at the bottom." }, { "from": 1002.8268249999995, "to": 1006.6556500000003, "location": 2, - "You can see us uh... selecting from a Movie table," + "content": "You can see us uh... selecting from a Movie table," }, { "from": 1006.6556500000003, "to": 1011.5105000000005, "location": 2, - "and then our... we're returning a tuple containing all the fields we want," + "content": "and then our... we're returning a tuple containing all the fields we want," }, { "from": 1011.5105000000005, "to": 1013.8378249999995, "location": 2, - "including in the subquery," + "content": "including in the subquery," }, { "from": 1013.8378249999995, "to": 1020.369350000001, "location": 2, - "we're doing an array_agg of uh... all we select from a link to the cast," + "content": "we're doing an array_agg of uh... all we select from a link to the cast," }, { "from": 1020.369350000001, "to": 1025.07405, "location": 2, - "joined against persons, and build all that up." + "content": "joined against persons, and build all that up." }, { "from": 1025.07405, "to": 1028.377350000001, "location": 2, - "All right. So now that I've talked about how Postgres." + "content": "All right. So now that I've talked about how Postgres." }, { "from": 1028.377350000001, "to": 1030.1541250000005, "location": 2, - "I'm gonna talk about why Postgres." + "content": "I'm gonna talk about why Postgres." }, { "from": 1030.1541250000005, "to": 1034.3332999999998, "location": 2, - "Uh first... an important thing is we target PostgreSQL," + "content": "Uh first... an important thing is we target PostgreSQL," }, { "from": 1034.3332999999998, "to": 1037.1110749999996, "location": 2, - "we don't target uh \"SQL\"." + "content": "we don't target uh \"SQL\"." }, { "from": 1037.1110749999996, "to": 1038.212175, "location": 2, - "And there are a few reasons for that." + "content": "And there are a few reasons for that." }, { "from": 1038.212175, "to": 1041.4404000000002, "location": 2, - "One, Postgres is an extremely powerful query engine." + "content": "One, Postgres is an extremely powerful query engine." }, { "from": 1041.4404000000002, "to": 1046.7206749999998, "location": 2, - "Uh you can give it complex queries and it... does a great job uh... running them." + "content": "Uh you can give it complex queries and it... does a great job uh... running them." }, { "from": 1046.7206749999998, "to": 1049.8487999999998, "location": 2, - "Uh it has important features like lateral join," + "content": "Uh it has important features like lateral join," }, { "from": 1049.8487999999998, "to": 1052.976925, "location": 2, - "and it has them for a long time and well optimized." + "content": "and it has them for a long time and well optimized." }, { "from": 1052.976925, "to": 1057.9819249999998, "location": 2, - "Um, and in general, targeting one engine allows us to be much better focused." + "content": "Um, and in general, targeting one engine allows us to be much better focused." }, { "from": 1057.9819249999998, "to": 1061.21015, "location": 2, - "Uh, we can take advantage of the one database we're supporting," + "content": "Uh, we can take advantage of the one database we're supporting," }, { "from": 1061.21015, "to": 1064.5885250000001, "location": 2, - "and design something that really pushes it to its limits." + "content": "and design something that really pushes it to its limits." }, { "from": 1064.5885250000001, "to": 1065.9899249999999, "location": 2, - "Instead of being spread thin, " + "content": "Instead of being spread thin, " }, { "from": 1065.9899249999999, "to": 1068.9929249999998, "location": 2, - "trying to target the intersection of a bunch of different databases." + "content": "trying to target the intersection of a bunch of different databases." }, { "from": 1068.9929249999998, "to": 1072.9468750000005, "location": 2, - "But even with all that, we push Postgres pretty hard." + "content": "But even with all that, we push Postgres pretty hard." }, { "from": 1072.9468750000005, "to": 1076.3002250000009, "location": 2, - "Uh, so one example of a thing that works great in Postgres, " + "content": "Uh, so one example of a thing that works great in Postgres, " }, { "from": 1076.3002250000009, "to": 1078.6025250000002, "location": 2, - "but maybe wouldn't in other places, is arrays." + "content": "but maybe wouldn't in other places, is arrays." }, { "from": 1078.6025250000002, "to": 1080.5795000000005, "location": 2, - "Which we make a very heavy use of" + "content": "Which we make a very heavy use of" }, { "from": 1080.5795000000005, "to": 1085.1590749999996, "location": 2, - " both as part of our binary output format and uh sometimes internally." + "content": " both as part of our binary output format and uh sometimes internally." }, { "from": 1085.1590749999996, "to": 1087.5364499999994, "location": 2, - "Uh, but arrays are not a universal feature." + "content": "Uh, but arrays are not a universal feature." }, { "from": 1087.5364499999994, "to": 1092.6915999999992, "location": 2, - "Uh, MySQL... sort of has arrays, as of a couple years ago." + "content": "Uh, MySQL... sort of has arrays, as of a couple years ago." }, { "from": 1092.6915999999992, "to": 1097.8467500000006, "location": 2, - "But, only in that it has JSON, and a JSON value could be an array of JSON." + "content": "But, only in that it has JSON, and a JSON value could be an array of JSON." }, { "from": 1097.8467500000006, "to": 1103.1770749999994, "location": 2, - "But there's no way to have an array of integers or an array of tuples." + "content": "But there's no way to have an array of integers or an array of tuples." }, { "from": 1103.1770749999994, "to": 1109.4833750000005, "location": 2, - "Uh, and speaking of tuples, EdgeDB supports ad-hoc tuple types." + "content": "Uh, and speaking of tuples, EdgeDB supports ad-hoc tuple types." }, { "from": 1109.4833750000005, "to": 1114.2631500000002, "location": 2, - "Which SQL actually has very support... very poor support for operating on." + "content": "Which SQL actually has very support... very poor support for operating on." }, { "from": 1114.2631500000002, "to": 1117.2661500000002, "location": 2, - "Uh, Postgres is just good enough. " + "content": "Uh, Postgres is just good enough. " }, { "from": 1117.2661500000002, "to": 1119.1430250000003, "location": 2, - "And a lot of other databases, I think," + "content": "And a lot of other databases, I think," }, { "from": 1119.1430250000003, "to": 1124.1480250000002, "location": 2, - "aren't to do things like access an element from a... tuple." + "content": "aren't to do things like access an element from a... tuple." }, { "from": 1124.1480250000002, "to": 1128.6525250000002, "location": 2, - "Uh, but even in Postgres it requires some kind of silly things." + "content": "Uh, but even in Postgres it requires some kind of silly things." }, { "from": 1128.6525250000002, "to": 1132.656525, "location": 2, - "Uh, to project out of a tuple, we actually pack it into an array," + "content": "Uh, to project out of a tuple, we actually pack it into an array," }, { "from": 1132.656525, "to": 1137.3862500000005, "location": 2, - "then we unnest that array and read the element out of the column definition list." + "content": "then we unnest that array and read the element out of the column definition list." }, { "from": 1137.3862500000005, "to": 1142.19105, "location": 2, - "Uh, though... I think Elvis actually had to submit a patch upstream to get that to work." + "content": "Uh, though... I think Elvis actually had to submit a patch upstream to get that to work." }, { "from": 1142.19105, "to": 1146.1450000000007, "location": 2, - "Uh, Postgres also has transactional DDL." + "content": "Uh, Postgres also has transactional DDL." }, { "from": 1146.1450000000007, "to": 1151.1500000000005, "location": 2, - "Um, so... changes to the schema can be made inside transactions." + "content": "Um, so... changes to the schema can be made inside transactions." }, { "from": 1151.1500000000005, "to": 1155.6795250000002, "location": 2, - "Then of course since they're in transactions, they can be rolled back if they needed to be." + "content": "Then of course since they're in transactions, they can be rolled back if they needed to be." }, { "from": 1155.6795250000002, "to": 1157.9818249999994, "location": 2, - "This is really important for a couple of reasons." + "content": "This is really important for a couple of reasons." }, { "from": 1157.9818249999994, "to": 1160.1590000000006, "location": 2, - "One, a migration step could fail." + "content": "One, a migration step could fail." }, { "from": 1160.1590000000006, "to": 1166.1149499999995, "location": 2, - "Uh, you could have some... cast in there or some... some check that fails," + "content": "Uh, you could have some... cast in there or some... some check that fails," }, { "from": 1166.1149499999995, "to": 1169.2931250000006, "location": 2, - "and you need to give up and roll back." + "content": "and you need to give up and roll back." }, { "from": 1169.2931250000006, "to": 1174.2230499999998, "location": 2, - "Uh, and it might be possible to implement it ourselves on top of non-transactional DDL," + "content": "Uh, and it might be possible to implement it ourselves on top of non-transactional DDL," }, { "from": 1174.2230499999998, "to": 1178.151975000001, "location": 2, - "but... really wouldn't want to." + "content": "but... really wouldn't want to." }, { "from": 1178.151975000001, "to": 1183.2821000000008, "location": 2, - "But more importantly than that, partially completed migrations uh shouldn't be visible." + "content": "But more importantly than that, partially completed migrations uh shouldn't be visible." }, { "from": 1183.2821000000008, "to": 1188.7625749999995, "location": 2, - "Uh, if there's a migration in progress that shouldn't be apparent to any client," + "content": "Uh, if there's a migration in progress that shouldn't be apparent to any client," }, { "from": 1188.7625749999995, "to": 1194.8186250000006, "location": 2, - "because the... the database just isn't in... um a reasonable state." + "content": "because the... the database just isn't in... um a reasonable state." }, { "from": 1194.8186250000006, "to": 1198.547350000001, "location": 2, - "Unfortunately, lots of other databases, other than Postgres, " + "content": "Unfortunately, lots of other databases, other than Postgres, " }, { "from": 1198.547350000001, "to": 1200.1489499999996, "location": 2, - "don't support transactional DDL." + "content": "don't support transactional DDL." }, { "from": 1200.1489499999996, "to": 1201.675475000001, "location": 2, - "Which would make it really hard for us" + "content": "Which would make it really hard for us" }, { "from": 1201.675475000001, "to": 1205.4792750000001, "location": 2, - "to provide the experience we want for migrations." + "content": "to provide the experience we want for migrations." }, { "from": 1205.4792750000001, "to": 1208.307100000001, "location": 2, - "Well, but separate from that, Postgres is just good." + "content": "Well, but separate from that, Postgres is just good." }, { "from": 1208.307100000001, "to": 1210.9597500000004, "location": 2, - "It's a good query engine, it's a good database." + "content": "It's a good query engine, it's a good database." }, { "from": 1210.9597500000004, "to": 1216.5403249999995, "location": 2, - "Uh, the biggest complaint we have about it is that we don't think SQL is... " + "content": "Uh, the biggest complaint we have about it is that we don't think SQL is... " }, { "from": 1216.5403249999995, "to": 1220.0938750000005, "location": 2, - "uh really stands up in a modern light anymore." + "content": "uh really stands up in a modern light anymore." }, { "from": 1220.0938750000005, "to": 1224.4982750000001, "location": 2, - "But... uh, but Postgres still does a great job." + "content": "But... uh, but Postgres still does a great job." }, { "from": 1224.4982750000001, "to": 1226.575350000001, "location": 2, - "And we think that, among other things, " + "content": "And we think that, among other things, " }, { "from": 1226.575350000001, "to": 1230.5793500000009, "location": 2, - "EdgeDB actually really helps Postgres shine through." + "content": "EdgeDB actually really helps Postgres shine through." } ] -} +} \ No newline at end of file -- Gitee