So the bottom line is, folks, we're taking the program off. We're taking truth for life off. And we're replacing with another Bible teaching program. What is worse than when a known false teacher, a known false prophet, a known heretic, someone who was just so egregious in their approach to the scriptures? Matter of fact, may not even have an approach to the scripture. There's something that is worse than when they lead people astray. What's worse is when someone who is known to be a solid teacher, someone who's a good teacher, a sound preacher of the gospel makes an error. And it's clear error based off of an opinion. It's worse when they do it, versus when someone who we know is a wolf. The reason why is because there are people who put their trust in them, who follow them because, again, with this influence comes responsibility. And the Bible even tells us, the Bible tells us in James, not let many of you to be teachers, why there's a stricter condemnation, stricter judgment, not to mean that if you do something or say something that's wrong, that means you're going to go to hell. You're going to have to pay for it with your soul. But no, there come some strong requirements that go along with what you're doing. If you are a pastor, such as Alistair Begg, if you are a preacher leader, someone who has great influence. And when he makes a statement that that we should attend trans weddings and I would also assume gay weddings, what have you that we should attend and bring a gift and the reason to do so is so that we can. So we don't give them the reason or the validation that Christians are judgmental and unloving and things like that. Well, first of all, the reason that they believe Christians are what they are has nothing to do with our actions toward them. The reason why they have a disdain or dislike towards Christians because they have a disdain or dislike towards Christianity. Why do they have a disdain or dislike towards Christianity because they have a disdain or dislike towards Christ? That's the reason not because of what we do now. Do we do things sometimes incorrectly or wrong handed or without love? Sure. But so does everyone else. But for him to come out and make the statement that he did, it's just wrong. It is it is supporting. And I don't know. He's not actually supporting and supportive of the LGBTQ movement. But what he says for some could come across as what Paul is warning us not to do, which is to give approval to those who practice certain things. When you bring a gift, you're you're celebrating that you wouldn't bring a gift or attend someone else, someone else's other sin. If there is some sort of, I don't know, someone is at a bar and doing all sorts of sexually graphic things at a bar at a club.  Go there and celebrate. As a matter of fact, bring them a gift. No, you wouldn't do that again. We have a clear line of demarcation between holiness and worldliness. And recently, the American Family Network, they have decided to part ways with him because of this to go, whatever. And so people heard that answer and people again to call us. Hey, what are you going to do? You hear what Alistair Begg said? What's your opinion, American Family Radio, of what he said? So that's what I mean by forced us to take a hard look at this and make a decision on what, what, if anything, we were going to do about it. So, Ed, you and Walker had a phone conversation with not Alistair Begg himself, but his team. Is that fair to call him yesterday? Yes, we wanted, we wanted to give him an opportunity to say I messed up right there. Right. And and I think it's the wrong. I said the wrong thing and I'd like to recant. Sure. And and we and in any case, we want to do the Christian thing. And in as much as we can, sometimes with public statements, you can't get in touch with the person who made them. But because they're public, you can comment publicly. But we have had such a long and fruitful relationship with Truth for Life and Alistair Begg. We wanted to have some sort of interaction. Now, let me just say from the outset, and then I'm going to get Walker to join in here, too, that the the the two individuals that we talked with, as Walker and I, with two individuals from Alistair Begg's ministry, they made it clear that Alistair Begg believes that homosexuality is wrong. He hasn't changed his views on that. He does not believe that homosexual marriage is valid and that the practice of homosexual activity is, as the Bible says, an abomination. So all four of us were in agreement with that. But Walker, what we could not get them to change. And they said that Alistair Begg is not going to change his mind was on the issue of whether Christians should attend, because that is what Alistair Begg was saying. Yes, he was saying Christians should attend and bring a gift. Yes, that's right. And the goal of the call and the goal of all Christians when approaching these issues should be reconciliation, but reconciliation and truth. And so that was our goal with the call with Alistair Begg's team. And we even asked point blank. So are you guys stating that Pastor Alistair Begg is standing by his original comment? He has no regrets. He didn't misspeak. He doesn't want to further clarify nothing. And they said, yes, he's standing by his original comment. So what I like best about it is that they have a relationship with him so they can call them up. Now, they didn't actually speak with him, but they spoke with his people. And he said, basically, he's not budging from that. He believes what he believes, which is fine. And so the consequence, at least for the near time, is that you're going to be off this radio show, which I think is a good move. And who knows what else happens. I would hope that other brothers that know him closely who can get to him and show him, listen, this is wrong. This is why this is wrong. I trust that he is a wise person. I think he just made a mistake because guess what? I don't care who you are. You are going to say some things that are going to be wrong. You're going to make some mistakes, which is why you ought to have a sounding board of people to make sure that you don't say certain things that you are clear. But maybe, again, this is opinion he he feels for him. Now, for me, I said for me, this is for me. I would never tell anyone to go to a gay wedding or a trans wedding. For me, if you invite me, I'm going. And I'm going to tell you why I'm going. I want the person who is getting married. I want them to know why I'm coming. If they say, fine, come on. If they say, no, I don't want you to come, I'm not going to come. I'm not going to come to support. I'm not going to come and sit down and be quiet. I'm not going to come and celebrate. I'm not going to come and bring a gift and hope hope you the best in this sinful relationship. I'm not going to do that. My job is to point out sin and to point people to the gospel, to Christ. And if I can't do that there in the midst of your sin, then I won't be there. That's the only reason why I would go not to celebrate. And now that's me.  No, that's an opinion. But my reason for doing so for me is found in the gospel. But if you want to say, no, I'm not going at all, no matter what, then fine. That's fine also. But to tell people they ought to go, they should go or that you would even go. And it's not to give the gospel, but to celebrate them and show them that, hey, you can still have love for them. They will end up accepting a Christ on their own terms, a Christ that's accepting of their illicit lifestyle. They will end up accepting a Christ that thinks it's OK for them to live that way. And that's just wrong. And so I applaud them. Now, I'm not throwing away House for Big at all. I still think he's a fine human being. I think he is a good teacher. I would still listen to him. But on this, he's wrong. And whatever consequences come, it's a result of this. And I think he really needs to repent of this as soon as possible. One of the reasons why he should do so soon as possible, similarly, what happened with Paul and Peter? Paul confronts Peter because he was doing something incorrectly. If we drop down to verse 11 in Galatians 2, Paul approaches and confronts Cephas. Why? Because he's eating with the Gentiles. Maybe he's eating pork, it doesn't say. And then when the Jews show up, he moves back. And what does the Bible say?  And so the reason why you want to do this is so other people don't get carried away with hypocrisy, with sin, with doing the wrong thing. And that's why he needs to come out and repent of this. And I hope he does. If he doesn't, well, then we'll still we'll still love him. The love that he says we are show to the to the LGBTQ community. We'll still show that love to him, but you're wrong. And we can show you that you're wrong while still showing love. But in the meantime, do not follow that advice. Amen.


Hello guys, this is we and today we are going to talk about go postgres and how to connect them Wow, this is one of my favorite topics, you know when it comes to building backends So this is one of the ways you can actually build back end in 2018 and it is way way more exciting. Okay, so Just before I start the tutorial and all The kind of exercises I just want you guys let you know that this is not a beginner level course for go or postgres This is sort of like an intermediate Course or series Where I won't be talking about the beginning aspects of go or postgres But I'm going to talk about how you guys can communicate using go to postgres Means how you guys can build back end where you're writing all of your model logic in go But actually you are pushing data to postgres. So So just mind that if you don't have Enough knowledge about go or postgres, you guys can just research it out You know see other tutorial series and everything and if you think or if you want me to go through that, you know Just let me know and I'll build videos for you about go or postgres. No worry at all. Okay. So what is go? now If you guys reach here, right? Just you know, then it means that you are familiar with the go and all the advantages of the course So I actually don't want to tell you because you already know that but I just want to say that it's amazing It's modern and it's here to stay and it's it's a long long time based, you know Prepared programming language Which is planned really good for the long term staying in the industry If you're learning go, I think you're at the right place and on the right career choice you made And other thing is postgres. Okay. What is postgres now? It's a database, right? It's it's been here like almost forever. I guess and Well, it's again one of the most used open source Database when it comes to SQL in the world It's competing with oracle and MS SQL and all those kind of things but one of the important thing is postgres Provides way way many features, you know that any of the database in the whole world Postgres is SQL database, but it has support for, you know, key value stores It has support for JSON related things, Bison related things I mean, it's amazing to have such text based searching in in built inside. So I think it should be really good But in this tutorial, we are not going to go that advance We are just going to see how we can leverage go and postgres to build simple, you know, models And based on that back end So any language any programming language you use, right? You actually need some way to communicate with the database now You can actually not Write your wire protocols, you know by hand. So for that you have libraries, you know Some people have come, you know contributed Well, fortunately in go, there are a lot of libraries when it comes to postgres Go even has official support for all the SQL right SQL databases Still, there are a few ORMs and everything which are really popular So one of them is go rm which I haven't I'm not going to talk about because it's generalized orm for postgres mysql and mssql and all other kind of Databases, right? So they are actually opting out other features, you know So that I actually don't like if you want to build orm, right?  Why because well postgres is being used Way more than those databases. I mean mysql is again one of the popular choice of people, you know, when they're building Where they build database backends So this is a pg which is sort of like orm for go lang and postgres, you know, it provides some added performance Uh, so it's really good Features, well, they have all the basic support for when it comes to dot time I mean serializing packets or serializing uh types from go to postgres So, uh You don't need to worry about anything else. They also provide, you know table to struct mapping So if you you can just write stroke and it'll get converted to table automatically So you don't need to like, I don't know manage all those kind of things And uh, yeah, they have other support for extra role. So they have a good support for transaction prepared statements They have a support for notification, which is kind of like unique because uh, let's see how it pans out Actually, uh, we'll see in the future. You will love it That's what I think And there's support for our timeouts and uh, connection pooling is also there And they have on conflict, which is like new feature that came out in postgres for like net port to net port 4 Which is sort of like upset operation, you know, if insert fails You can actually write another query which will run when in the case of insert fails. Yeah So they have a bulk insert update deletes, which is really good And they have a support for migration and sharding which will also be looking into uh In the future. So this is like sort of like a driver and uh, this is how it works and uh, I think we should get started then, you know, without I think wasting your time Hello guys, this is Ouija and uh, in this video, we are going to talk about Getting started with the project, you know, we'll do setup and everything before we do I just want you guys to install a little bit utilitical glide Glide is nothing but a package management for go if you're using go for a long time you made You might be knowing about that. So uh, go has by default go get Stuff, you know, but it's not that much useful when you want to do a good level of project management So I use glide I already had install if you didn't install it's very easy You just have to copy this and uh Paste it on your terminal and it should be good good to go and then you can just do glide in it on your non glide Uh projects and it's it will just scan it out and initialize everything And uh, so with the configuration file is in glide.yaml. I don't think you will have to Maybe ever touch that file again. I think we'll be done command line. So don't worry So it's that easy, you know, and if you whenever you want to install any dependency you just do glide get And the path that's it Okay, so let's get started. So I have glide installed already As you can see I'm just going to clear it out and I'm going to create a new uh order All PG Putes I'll go to PG tuits. Okay. I'm just gonna do Glide in it Okay Now as you can see we have a glide.yaml It just took glide.yaml. Just see nothing right because it tried to scan our directory But couldn't find any, you know go file to scan So that's why he did not scan anything and it didn't put anything in the glide.yaml But just initialization. Okay. Now.  Okay So we need this as a dependency In our project, I'll just clear it out. Okay. I'll just do glide get this path And it's downloading now. So what this thing will going to do a glide will going to do It's just going to do go get and it's going to actually store it in glide.yaml So whenever you for example, two guys are working right and you actually do some change and push it Another guy will pull it right and in in that time if you did any dependency, right? It actually you know can download from there On top of that, this is like render dependency. Okay. So these are not like global dependency These are like project specific dependencies. So for example, if you see the render folder, right? You will will see github.com and then go pg and see This will locally uh Install your dependency So it won't affect for example, if you're using one version of go pg in here And if you want to update in some other project, right? Then you can actually do that So that's why it manages separate separate local versions of your dependency of your libraries Okay, so uh, this was uh, so we actually got uh, let's just do win glide and check it out. Oh, sorry Imglide.yaml Now as you can see it's importing, you know, this and version is this so it's very easy Close it. So this is it. We are actually downloaded our go pg dependency and let's now Start the server. Okay. So I have a postgres locally installed. Okay, and uh The other thing is this is pg admin, you know for the simplicity. I'm using pg admin and As you can see I already connected To pg admin. Okay, so I have a true database right now postgres and toots. So I'm just going to okay. So this is like toots Already created a new database. Okay, so we are going to trying to connect with the toots So before we go that I just want to say just uh, you know finish the with the done So I just want to be done with the project setup Uh, so I'm just going to open that folder now. Uh Good learning and then yeah, I do so many learnings. Yeah, so this is our project We opened it Okay, welcome. So I'm using the vs code. Uh, because it's well, it's really good. I guess One of the thing is it's really good and they say it's uh, they have inbuilt terminal and all those kind of things. So I like those Okay, so I'm in here and uh, here is our glided yaml, you know I'll just make the font a little bit smaller. So yeah, that's it. I think it's I am pretty sure you guys can See this. Okay Now, uh, we have a vendor and as you know, we need to create a main dot go file. Okay This is are gonna be our main file. Okay. I'm using vim bindings. Okay. I have in the uh vs code. So it's gonna be like something like that Package And I'm just doing, you know Hello a little bit. Hello world thing Okay Oh, it's funk. Sorry. Sorry for that. That was like some weird mistake I think install some dependency, I guess It's a piece of it. I don't worry about that. Don't focus on that and uh Just close this Yeah, so this is our hello world. Let's just uh compile it and take it out to hard work. So just go here and open the terminal No It's a good terminal and it's here. I'm just going to go build It build successfully. Now we have a pgtude binary. I'm just going to run pgtude Hello world. Well, as you can see So this was our project setup. Okay. So uh after that uh from next tutorial what we are going to do is we are going to create a separate package just for the database related things and we are going to start putting stuff Inside that database Thank you very much guys. Uh, I'll see you next tutorial Hello guys So in this tutorial, we are going to talk about how to connect with the database using a driver call gopg Okay, pretty simple. So the last tutorial what we did we created a structure we created, you know, just a framework we uh You know created this whole glide related. Uh, uh, you can say project So glide is a package manager, which will we are going to use to, you know, install dependencies and keep track of Which version of the dependency we are using and everything, you know, glide will take care of it So if you see here, right? See you can say package inversion, right? So we are just using gopg Nothing else you're using so it just shows that okay So let's get started. So what we are going to do now we are going to create a new package called db. Why that? Well, because we want everything else that we are doing, you know into one package So all the data is related functionality, right? You will be putting in one package. It's that simple You know, you don't need to worry about anything else. Just So what why like this? Well, if you are software developer, you will know that, you know, packaging your Uh, separating your code modules, you know into packages is good If you're multiple developers are working, right? You can work on your db Part and you know, other guy can work on the api part and you will never be Be colliding your code or anything like that So it'll be separated. Yeah, that said, there is no actual reason, you know You can actually write it down the whole db related things in the main.go And it'll work just fine, but the code won't be maintainable. So I would not suggest you to do that Yeah, so, okay, let's create a package. We created a package. We'll just call it We'll create a new file inside that db package will current main.go Now you can call whatever you want if you are You're doing a goal that you might know package tb let's Import our driver for eithog.com slash gopg That's it. We can alias it using here like this Now we are going to create a function called connect She's going to connect to database and we are going to test it out It's that easy nothing fancy or anything now I have a local version running Okay, so let's just Connect it Password, okay, as you can see I was able to connect to the local and if you see list of tables and you know list of table spaces So this is a tool called pgcl I'm using for macOS because I couldn't find psql for macOS. I'm sorry guys This is pretty familiar. If you are familiar with psql, this should work fine for you And this is I think a little bit.  These are like your table spaces and just by doing D plus you'll be like, okay, give me the database, but I don't have any database. So, okay We got it. Okay. Go back to the code now What we are going to do is we are going to try to connect to that database, okay Forex, sorry for before that we need to create a database So what we are going to do is we are going to, uh, write Vertical create database Hmm Okay, we already have one database called postgres, but uh, no, sorry. We already have a database called tute So we are going to like describe Okay I did not connect through postgres. Yes. I did connect through postgres Hmm. Okay. I think we have a database called, uh, tutes. So we are going to try and to connect to the database. Okay Uh, let's get started then I'm kind of new with that pgcli tool. So forgive me if you know I seem a little bit confused. Don't worry about that.  I'm just going to create db Is equal to uh, pg. So they're method called pg.connect Okay, so this is it is that easy as you can see all you have to do is pg.connect it'll give of course You'll be like, hey, where do I need to, you know, give host and User import and everything. Okay. So for that, we have something called options So we'll create options pointed to option is going to make db.options Options, okay And inside that they have a user which will be in here pj That's me And then then Password Is going to put regions in because it's a local and you guys cannot do anything about it Another one is address And address is a column separated a column separated, uh, you know, are you are an import so Local hosts five four three two Sounds good So these are like three fields determined that it should be okay Yeah Okay, so it's showing that undefined db. Oh, sorry Should be pg Nice. Now what we are going to do. I'm going to pass on this In here perfect Db declared in node use now what will happen if it'll connect it'll give us a pointer So db is nothing. It's a pointer. Okay If you were to write something like this you can write something like where db of type Pg dot sorry of type pointer pg dot db Is equal to this so you can say this is the type that we are talking about Okay, db declared in node use of course, so this is a pointer It's what will happen in the case of it will fail and throw an empty pointer Which is a nil pointer safe db Is equal to nil means We'll just do log dot print f Okay, it's gonna be something like Fail to connect to Database that's it And you can just do after that os dot Exit With reason. I don't know some number 100 Like a fail to connect. Okay Else. Okay. Else. We don't need to write because it's gonna crash anyway In case if it doesn't, you know Print f I'm gonna be like, okay Connection to database Successful Sounds good. Now you have a db object. What do we want to do? You can do and after doing that What you have to do Is Close it. Okay. So once you are done with the db whole because if you're creating an api ad then It'll take a long time, you know, otherwise you can just close it out. So how you will close so it'll be like Close error is equal to db dot Close This should close it check for the closer if his closer is not equal to nil Hence Output print f There are one close thing the Connection You know printed out that are how you do the percentage three Said reasons. So this is a good way to write the logs Okay, so when you print it will show you Close it You figure it out. What happened wrong and you can just do it or exit you need to Press your program. So after that, oh, you can just say log dot print f and just Wait a minute As you can see, this is our basic. Let's compile and check it out You go in here. Okay Go build It compiled as you can see we have pg2 new binary. Let's run it out Okay, now what went wrong because we created the function, but we never used it right. So I'll just go to main dot go Okay, this is gonna get tricky and I need to get the package. So I'll be like, uh, db Okay On a prefix with db And I lower it after that. I'll be like just calling call db dot. Let's check if it's the right Define db dot. Yeah, why we calls small c. So it's a private function Okay, let's see there is gone. Let's see. Oh, sorry Go build compile successful Get it out Boom as you can see hello world connection to database successful and connection close successfully, which means Yes, we were able to successfully connect to database and Connection after using we actually close the connection Now you will be like, okay, this seems really good But how do I do queries and how do I insert data and you know do all this kind of things, right? Which you need to do when you are building really highly scalable server applications So no worry guys, you know in the next tutorial, we are going to talk about but before that, you know Doing all the query and everything you need to understand the model How you will be able to you know convert the go types into SQL types and all those SQL related PG types to go type, right? Because serialization desilization library already provides, you know, you don't need to do that So next tutorial we are going to I know Space you create some strokes and you know, we'll actually create Table according to those strokes and then we'll see How it works out and everything. Okay guys. See you in next tutorial Hello guys, my name is pj as you know and In this tutorial we are going to talk about model definitions, okay But what is model definition? So for example, if you're using some sort of Language with some sort of database, right? So what you want is you want language specific data types to convert into Postgres or some other database specific data types, right? And you don't want to do that, you know, so for that you have these libraries, you know So and one of the library that we are using right now is gopg that we are discussing and Let's see how gopg this, you know converts all of your go Data types, I'm sorry to postgres data types, okay So when it comes to database, right? So database is like the root inside that you have tables, uh, you know Concept of tables. So those tables are equal to Structs in go or gopg. Okay So you can actually define all of your table as a struct and all of your field as a column of the Table, it's that easy Okay, so this is a simple, uh, you know concept of a product Uh table that I just created, you know in five minutes. So this is just to show you guys, you know, how it, uh Feels like so this is a Model of product that we are going to create. Okay, so let's create a wasting of say Product don't go in the db Oh db Now the greatest, uh struct, uh Uh product type product I was just checking the autocomplete is working. Okay. So now this is is equal to okay So now when you're going to use uh Pg, right? I'm just going to write down some comment how it's going to behave. So When you actually run this, uh gopg migration or gopg create table, right? That we'll be seeing in just maybe next tutorial what it's going to do. It's going to create a table name products So now the name of the table is going to be products Why because one thing you'll do it and actually do uh, you know All the camera, uh, see this kind of capitalized cases said it's going trying to make it in camel cases separated by underscores So if you if you write something like product item, right? So it's going to create a table called product items product items, so So what is happening is it's separating by underscore all the capitalized? Um Uh words that you're writing and it's pluralizing it. Why because the stock represent one item, right? But table will have collection of items, you know, so it's tight. It tries to do that So whenever you create table, just skip in mind that but of course If you don't want that and you want to manually write your name of the table But there is a uh field called table Name, okay, this is a private field. So remember all the exported fields or public fields, you know, who's aware Uh, the name of the field start with the capital, uh, letter are gonna be actually working all the private fields Like these they're just gonna get ignored. So you don't worry about that Struct we can just uh product item How is happening is uh, whenever uh, you know, go busy and try to uh I'll create the table and look for this field if it contains this then now our table name is gonna not gonna be like this This is like the before we're doing but we are already with uh product items collection Okay, now let's create something called id integer. Okay, so this is whenever you are typing id Or id so it's going to track it. It's uh trying to make a primary key out of it So this is gonna be our id and let me just take other fields. Uh name unique You can also like you know change your uh column details also using uh Sql tag Sql I'm gonna change the name of the id. It's gonna be like id. Okay, and you can also do this is primary key manually It's gonna get Unrated primary but you can do manually like this. You can use primary key. Okay. Another thing is This is a good practice in a I'm actually trying to make this thing unique so you can see Works right. So this is how you use the constraints and everything Just try to remember that you need to use sql at column level. Okay, and it is good practice to just give your name here Just Now one another thing I would like to What if you want to change the type In this case type by you know real because if you do floor 64 by default in titan numeric or something like that But I want really not small Number small floating my number Like that. So this is how you can change your post to stripe So this is our whole determined model got just created So whenever we turn the command Call create table right in actually get all the properties and all the details and it'll try to create table out of it Okay, so I think nothing Was this yeah, see we just created a table And I'm just And it is a good practice, you know all the models you create in a separate go file. So as you can see it's gonna be like Expert type Okay, so as you can see this is uh, almost done Uh, so this is how the modeling works. Okay. Now you might want to know what type you're supporting, right? Also Here's the thing Hmm So these are all the types that we are are supporting Uh, when it comes to go pages, okay So these are the go tabs and these are the postgres types So if you see integer 8 you add gonna be small in 16 32 integer and these and that float that it is gonna be real Float 64 is going to be double precision that we actually talked about pool is going to be Boolean since it's redacted Why is it right today? If you are actually embedding another struct or map Or array that's going to be jsonb. Remember, this is really good. You want to try it. Okay Uh, we can actually try different features actually We can just embed another uh, okay We can just give feature name Hmm There a feature uh description is gonna be And I don't know importance, you know how important the feature is gonna be sort of like writing or private uh Our priority is gonna make it into just two, you know, so they should get going to jsonb Or you can what you can do is to give type And be right how hard it is as you can see it's really easy Okay, so this is how we do even if you create a map right map it also If you create it it's gonna be just gonna be nice And the time that you are doing is going to be time spent with time zone and IP addresses we don't have So I think that's it. Okay What if you want to ignore something okay for example, I don't know you you want to use it for example Or for the stock purpose, but you don't want it in the table. So I don't know. Let me just get a name. Okay, something like uh That's point. Okay. Just a point is just a reference somebody. No, nothing else with the database. What we can do is we can actually do like SQL underscore Sorry not underscore Gonna be as good as so what this is going to do is this going to ignore this feed Okay, so whenever the conversion is a conversion is happening from go pg to uh pg or Go to pg, you know, on the side, this will get ignored, you know So you can use it as a destruct normal struck data type in the Whenever you're using the go but when you're using it for for the reference of the database this this won't even create A column in the database so it won't be present This is how you can ignore the field that you Ignore Oh, I think this was it, you know when it comes to modeling So this is like the very basic modeling if you actually want to get into the detail Right, you can actually go to the go pg model definition Wikipedia, you know And you can take it out all the details. I think this is uh, all the hell I guess And this is all it requires, you know, all the all the other things are in the database specific that you will have to Write it in the database, you know, so So, okay, uh, so the next detail guys, we are going to see how to create a table Using go pg, you know, directly without writing any queries like create table these and these columns and everything else Okay, I'll see you then Hello guys so Well in last video we have seen that okay, how to create model definitions and everything Let's create a table out of this model definitions now, right? Okay So i'm just going to uh Write a function to create a table out of it. So i'm just going to be like function uh Items table, okay, this is like my function, so don't worry My treatment error nothing else, okay Now, uh It's very easy to write today create table. Okay, you need a little bit of options. So Although create table related options are stored. I'll just copy product code Okay What I mean another sub module in pg, uh, which contains some options. So first of all, we will create options Required to create a table. They're not required But I think one of the options specifically you should write Just put to be on the same site or m dot create table options One is if Not exist so So this option will tell uh Go pg that only create table if it's not if it doesn't exist, you know, just don't create it if it's already there, right? So what happens is this suppress is one kind error So for example, if you're running your script, right? And it's all automated and you know, you just you don't check before creating and everything So you'll throw an error while creating the table. So this is good if it's already that then we'll just ignore it It won't create it and it won't even throw an error Okay, now just create uh create error with uh Okay, I also need a dv I guess because reference db db of type pg dot db pg important pg How do we create so we will have a database reference. It'll just be like db dot Create table. It's that easy give the model definition, which is uh reference to empty product item object and options that we had Okay But create it okay now. Let's check if Create error is to needle then just log it out printf uh Error while creating table terms These are And our function is ready Like it and okay, so when we connect to the day connect to the db, right? Here will be just like That I don't actually want to check I'll just create products table with the db reference that we had and that's Before closing the connection, okay, let's compile it for that because I already Get there that so I just need to delete it. I guess Just check it out. It's already there delete it first Okay, so nothing is there So Program it's compiled Okay table product items created successfully as you can see let's just go here and check it out Yes, we have product items collection. Let's if you want to see in detail you can just There you go So as you can see this gives all the structure, right? So see id is a big it It's a next value. It's a serial, right as we you know discussed by default And uh primary key id already took it, right and name is a text description is text This see feature is json b as you can see, right? And created this times and the times boolean and everything and this is the unique key that we created, you know So this is how it works, you know, we just create a table out of calling without even writing a single query This is really good What the options right if for example, if you'll run it again, right? It's just saying table product item created Why because it's ignoring the fact but it's not actually creating again and again If you see, right, it's just the same table But if you'll remove this option, okay this This option Let's see how this pans out now date Well, I don't like creating table. Why because relation this already exists as you can see, right? Now you don't want to check this again and again, you know, you just want to ignore it. So Why you just put this So healthy way of doing things, I guess Okay, as you can see, it's working. So guys, this was this is how you create the table. Okay next today We are going to talk about how to insert some data in the table. Boom. Thank you guys Hey guys Let's talk about uh inserting some data now, okay Oh, so you have an object you created an object You have this api that get called and you know you create this object And you want to insert some data into or you want to insert some product items in Do that Okay, so let's just you know, it's it's pretty easy actually. So let's create a function I will just receive product item product items Siver I'm just going to call this save I'll take db your pointer Argument it'll just return So inserting is pretty easy. Okay, so let's just see Well, uh, it's gonna be like insert error db.insert. I mean, it's that easy I'll just pass on reference of my item, which is pi That's it. And if I'll be like if Set error is not equal to me. Oh error while Bring me um to db Also to print some reason Percentage is useful printing out the interfaces by the way might be thinking And Okay, otherwise This is we created the same function. It's going to insert it. Now we need to call this function We just gonna go to main Okay, main will have db. So it's easy. Okay So I might make some changes some changes. So when we connect, right, we should give a reference to db Uh, we should be like pointer to pg dot db return this db. Okay So we're gonna remove a couple of things like uh closing up the connection. We're gonna remove from here But now we won't even spot that about that uh using anymore I'm just going to get the connection try to create the table if it's not exist Okay, now there's a written db So this is a video cannot write your code here because this is stated Are you going to main.co? Okay You created an awesome product Take uh I'll ask for db pointer here because To I don't think we will need uh, we will need this Pinter Now what I'm doing is I'm just going to create a new product here. Okay How do you do that? It's simple new product item Is equal to db dot product Just create this item ID we don't need to give uh, we'll give something like uh Name is gonna be no. Yes. Okay guys, so let's create an object in here. Okay, uh One second, okay, so I'm just going to give a name of the product one to copy all the Name description Description this is a test data This is Description and I had something else I guess Something to do with uh importance Three right Okay Yeah, so that's why you might want to you know if you want to if you don't want to add like a non-struct Create uh, some other sub type or something These are the techniques that you might want to learn, you know, it's gonna be Free That it is time dot how get it Time dot How Do Sure boy, what's it? You created a whole product is see Let's save it now. So we already have db options. So what I'm going to do is I'm going to be like Oh, okay, I mean give this a db db ref because we already have one db even Yeah Now what we're going to do is uh, oh Okay To db ref What's bg db and we have another uh, okay, so what I'm going to do I'm just go product Item dot you created save function instead if you if you remember But for that we need a pointer s you are and it'll ask for uh db ref That's it. It'll be written to me I'm just going to call this here product page db As you can see I think works Let's compile and check it out Well it compiled wow product product when inserted successfully, let's see And this is Select star from What was the name of the table? I always forget Product I'm just going to copy this from Well, as you can see we have our first product Okay, so name is product one description is product description. This is image path price is 4.5 As you can see feature is adjacent with values. I added right right into any encoding decoding It's all done by the pg go pg It's amazing created at a time it took care of you updated took care and This is how you insert Okay, now, what if you actually want like uh You want look to return that whole product, you know, whenever you insert right you want that whole product is written So that also we can do so I just go to here Is the insert save right so You can create some other function something like Sometimes, you know, you might want to have that whole struck return to you, you know updated or something like that So we'll be save and Return okay, let's create a function called save and return little again for db It's kind of digital instead of just return it return it up on with pointed to uh product your product item and in case Okay So how do you do that? It's very simple Okay, so first we need we already have a product that we want to insert here, but we need to create a new Okay, so let's try it out Set error by dot Well, sorry, uh, it's gonna be like db dot by dot returning Okay, and you give give me everything in return then Insert okay So I'll give you result as well as errors. So the Third is search if insert error and log dot printer error Thing and I also might want to know what you got male Because you need to return to write this log dot print have item letter fully I'll do another look. I just want to know what is actually we got right so they saved new value result is percent zero no types That will print it out and then we'll return pi and Let's see. I'm just written by just for the sake of it, you know here But actual main and we'll just Update the product named it too because that's a unique fear. Okay, everything just keep up Everything else should be same doesn't matter. I should have said I'll save should give New product item, sorry updated product The Like this should give Okay, what if we just don't because we don't need it. Let's just remove it. Otherwise, I might have to print it out here again The same thing will happen. Let's come back. Check it out. Oh, yes it's my error Okay, incident successful news. It is this Okay, so we have a reference and we have this so we need to actually get into the result and see what is actually written Okay, so we'll go here Let's just see result dot We'll get model rose affected and rose written right so rose affected is uh Uh, we need to uh, okay, let's check it out Uh, so what was that in that? Here insert results model Or a model dot I think it's gonna throw an error because of primary, right? Yeah Because you see this is how you realize, you know that The thing is get Got inserted or something like that Hmm. Okay, it's a freaking pointer But you got the idea, right? So you can actually get uh, okay, let's see. Uh, the thing Hmm It rose affected Yeah, because there are Yeah, this gets Yes So that might also be integers all the things that they're providing right their pointers, you know So you might have to convert and you know to uh, decasting and stuff like that But you got the idea, right? This is how insert works and other things as a kind of insert is bulk insert Okay, that I thought I should talk about it bulk insert is uh, it's like, you know Inserting multiple items. Okay, product item Say multiple And ask for like, you know, um Items dot dot dot if you know go then this is called. Okay, product items References of product item error See how multiple works Very easy. All you have to do is, you know, wait Insert error dpo we need db also, sorry Like the kind of like pointer to p And this should be pointer not reference Yeah How are you going to do that? Okay, what is going on here with the final parameter? Okay Let's not just use something like this in here Superd here because it's periodic function parameters. Yeah, won't be able to find it out. Okay Looks good. Now I'm going to do db dot Model small is actually when you want to insert. So I'll be like items Insert that's it Well, I think I'll yeah I'll give you some results That will you write number of rows affected and stuff like that. So We actually don't need that thing. Let's see Let's call it if Set error is not equal to nil printf error island starting bulb item Reason being See what is the reason Um, as you can see We did both Oh, what are we gonna do? It's called create a couple of these items the same function. I don't wanna, you know, so much cold I'm just going to write two product. It's gonna be product number five Function name that we give First was deliberate. Uh reference another was comes very early Okay To UPR Got it Yeah, we have db do a db ref Deep all okay. Okay. Okay. Um, no new pi one Function written the way it's written is a little bit Wrong, but that's okay Not uh error while inserting bold items reasons model not fighter I need to give pointers and I'm giving the pointers Okay, let's see what is going on pointer as a pointers I can do sort of this And just now where you are the right so much for where did it functions? Uh, then I love to create, uh total Tom to arrive Uh What do you think what to me and what is going on in here Okay, I mean something like this Yes Got it. Sorry for my misunderstanding with that thing. I think they're asking to give non pointers See You go here. Okay. I think I got it man You need to give you something like you cannot just give array. You need to give something like You know, this is supposed to be Yes, see this is supposed to be you give erratic functions. You cannot give array and I give array my bad I'll just take it out if everything is there the next Hello guys So let's talk about uh Parameter placeholders. Okay You have written any kind of uh Queries before right you might know that you know when you write the query you actually instead of embedding the value We actually embed a placeholder like questions or dollar or something like that and they just give the Uh query after that, right that value after that, you know, so that uh mostly in other drivers It um, you know helps again sql injections and those kind of things it also does in gopg Uh, so let's get started. Okay. So I'm just going to just give you a simple demo If you don't know already what it is So I'm just going to create a small function. Go, you know This older demo Okay, we'll wait for Or We will have some value that we would like to uh get scanned because what what passes it is happening We'll do some query and whatever that query will return, right? We'll actually put it inside this Uh, okay So let's just run the query dv dot query Okay, let's see the signature of this So this query is actually a function that takes model, okay and a particular query And uh, whatever uh input parameters that you're giving and it'll give you result and error result. We don't care They'll give you a number of affected and this error. Yes, uh Select error, okay dv dot query First one is the model model means what model means the data that you actually are expecting to put so dv dot scan So not dv dot It'll actually Uh, so this is where you're actually going to get uh yours when you scan So for example, if you're into your query is written in five columns, right? So actually you want to scan all of the five columns in here So this is where it all comes into the play. So that is for second one is query Uh, so I'll just say query and third one is params. Okay, params. I'll just put like some sort of value 42 for example a query I love to write very Type string is equal to Select As you can see, sorry As you can see I've added question marks. So the question mark here is a place Placeholder is something That you put uh inside the query, okay? And whenever you are actually running in some function, right? You expect that is to be replaced by some particular Value So in this case, what will happen is this query is actually this query, right? I'm just, you know, I just I added it as a variable Now whenever this query will compile, right? So the gop is you will expect this Sorry gop is you will actually try to put this 42 in place of question Okay, so what the query says it written whatever value that you are giving is input, okay? So let's just see, okay first for leaf Like error is not needed to do error management While Very you tell me by printing Okay, and then I'll just return After or Things done, uh, we should just scan This full all square schools can't value It's integer. So I can represent ht and then you write The query is successful. Then we should get 42 as a result and That's it works. Then you to call this function Uh Sorry There you go scan successful scan values for to do To be honest to write how queries works in here, but this is not specific to query.  Okay, you can just give Zero Also, you actually expect to zero. For example, if you're giving you like 42 32 32 something like that. Oh What happened? You crashed. I guess somehow that doesn't happen In the setting What are you supposed to do? Let's see if it works or not Okay 42 and what if I just replace it one Damn 41 see as you can see so this are called a positional parameter. So, you know, what happens is see Uh, when we uh, see currently the thing is it's very small, right input and output That's why you'll be able to do that But trust me, I've written the queries where you know, I was giving like 20 input as a Place owners and what happens is I used to give like on you know the order So now after that, you know, if you want to remove something right then you have to push everything one step ahead And you know that it gets kind of messy So instead of that what you can do is actually kill, you know, put on this positional parameter So even if you like whatever that you know value that you need to change or something, right? It doesn't affect it. Why because it's don't depend on the order It depends on the position. You can actually give the position. You know, it's that easy Okay, one more better thing the third thing that I would like to talk about is named parameters Okay, so it's better than even positional parameters. It's called. It's okay. I'll just create a rocked, okay Type uh rams Rocked uh, they're um one Ring Chew Ring Sounds good Interesting Now what am I doing is sort of this I'll be like they're on one you see how it's happening, right? Oh, this is like name parameters, but I need to create object of that that I'm so I'll be like they're arms Because I need to supply the rights Rams They're one is gonna be like uh, this is Chew is like This is around Chew But when we return we should be expecting And our value will be straight Okay, now I'm written in this instead of All these things and we just say per arms See this is pretty easy, right? So it should written what this is better one. Yes. Let's see As you can see scan successful scan values. This is better one. Well, I Stake in here to the mean percentage Yes Well scan successful scan value is this is better one. Okay. Now if you think that oh, I don't like this We like better. I'm too boom boom Oh where the crap that thing went sorry guys for the language That's it. See it is that easy, right? You are not actually literally doing anything see so these are like three ways you can do place ordering when you are using go PG library, you know This I find it really interesting. So one of the things I find it so interesting is the name parameters Uh, you all you have to do is just you know create some struck for example If you're writing some sort of big query you just create a struck and put on all the conditions with k value, right?  So one of the other thing is again, it's see though. It's not it's not uh, it's again Passing with the camera, you know passing all the capitalized into the camel case, you know Separated matters course and everything. So you have to be like that You don't understand that thing also So this was all about parameter holders. Sorry. Sorry placeholders guys, uh Why I actually had to push this because all the other queries right update or uh, you know, uh Delete or select and all the other kind of queries This is must required because you will have all the bare conditions and everything right and all the conditions mainly we use name parameters So you have some better idea what name parameters that right? So I just thought I should just you know Give a tutorial on this before I move ahead with all the delete and in sorry delete and update and Other kind of queries. So yeah, this was it, you know, try to learn a little bit about it You know, if you have any question, you can just Shoot me a message, you know, I would be love I would love to or more than happy to you know reply you regarding this Thank you very much guys Hey guys Well in this video, we are going to talk about how to delete It's gonna be a pretty tiny video because there are just a couple of phase you can delete stuff, you know So no big deal Okay, so I'm just going to okay now we have product item and everything but you might be thinking that I don't want this product item anymore Or you think that oh, this is I think Put, you know, by mistake or something like that. You want to delete it, right? It's pretty easy create a function Product item and just to just create this, you know delete item method and expect pointed to dot Of course Now delete is again pretty easy. Okay. What do you do? You do db dot Again, first of all, you select the model. The model is what it'll actually put your uh Whatever table item is right row into the It'll load as a civilization thing Then you can do whatever you do. So what we are going to do So if you for example, if you on simple delete right delete by primary key, which is like ID You can just do db dot Delete and you know, you can just give PI but in this case you might need this ID because what this does it will create a query call, you know delete from Able name where ID is equal to this, okay But mostly I don't think that'll be the case if that'll be the case that you are deleting by ID Then you can just do db dot delete and be done with it But yeah, of course, whenever you in this PI object, you need to have your ID set. Okay. Yes But mostly that won't happen. Mostly you will be deleting based on some sort of condition, right? So How do you do that? So simple db dot first of all, you load the model which is uh by dot You'd add the condition where uh Let's say name is equal to placeholder name Okay, and what should be the name? Uh, come on. Give me that. Give me that. Give me that. Okay Now that will get from here only, right? So we don't need to and give and then delete that's it So I told you right last week, uh, It's going to be placeholders, you know name. So what happening? What is happening in here is when you do db dot model, right? So now this model PI is in context, okay? So whatever name placeholders are referring here, right? There we are that we are referring from this PI Uh parameter object, you know, so that's why we don't need to separately here give any structure because internal It'll take data from here and then we just have to run delete query. Okay I'll add again the written result and error. So it's a result. We don't care if there is some Delete error, then we can just check it out. Okay delete error Is not equal to nil, then I'll be just like log dot printf. What I'm gonna do is I'm gonna break Error while deleting Some Reason could be percentage error To return Delete error There's full Person PI dot Got it. Okay. Let's delete it. I'll go to main. I will remove this place and we'll demo a No, create a function delete I'll come Delete item Preq DB ref as pointer We need to create object remember because we are running we are doing everything over that particular object The new PI is equal to Item I just need to give name because we are referring just name only some name. I'm gonna give what Let's delete product five Is that This is what matters and I'm just going to run that thing with DB dot No, no, sorry. You can run on new PI because we already have Item So I think it should be just delete with the DB ref Okay Let's really just go to here and just say delete area. So that was the name Looks good. Delete successful for product five now just Next time Items collection Is sort of complete So if you see that product one product two product three product four and product six, so Product five is gone So this is how really it works. You know, I mean, there is no big deal about it You know, you can just write it down easily and it should work Another thing is just an experimentation Yeah, so You got it, right? It's very easy.  Okay, whatever data you're deleting It'll just it they're gone forever. So whenever you are using the delete just be careful Rest it out on your staging or development and environment before you actually put it in production Otherwise you might mess up a lot of things That you might not get recovered unless you have backup or something. So this was a delete guys Maybe an extra tutorial. Let's just see how to do updates and stuff Hey guys, look who's back Yeah, okay.  There are like way Different different ways of doing this


Gary's there, I'll be presenting our talk today, so probably I'm assuming everyone, if not most of you, at least were at the keynote this morning, so that was definitely a lot of like high-level overview of what is Gutenberg, kind of its path. For today I want to focus more on some of the actual steps of using Gutenberg, what are the blocks, how do they kind of interact with each other, and all that fun stuff. So just a little bit about me, I'm up down from Portland, Maine, I work at Hall Internet Marketing and we do a lot of WooCommerce development, and then we've been bracing ourselves for the Gutenberg update and just trying to grab our heads around that. So I think it's pretty, you know, clear to say that Gutenberg will be a pretty big change for the platform. My personal feeling is, I think this is a positive change for the platform, that it will bring in a lot of new options and flexibility which didn't, which doesn't currently exist, but there's definitely parts of this which, you know, honestly are making me a little nervous in the short term. I can see that in maybe two years, you know, we'll be talking about whatever the next thing is and Gutenberg will just be WordPress and we'll be talking about that old classic editor and how that's gathering else at that point, hopefully. So just a little bit, this was a quote from Matt Mullenweg back when Gutenberg was first being announced.  There's some really great pros to it. It's a very simple editor, in my opinion. It should cut down on the need to write your own HTML. There's definitely been times I can think of when I'm using the visual editor and I need to switch over to the HTML just to add a class or something like that. And I think that Gutenberg will offer a lot of opportunities for developers to create really dynamic custom Gutenberg blocks. We're starting to see some of that come out of the community and I would predict that we're probably going to start seeing locked libraries and I think a few of them have already come out at this point just to add even more features to the tool. And the thing that I like is that it removes the mystery meat of WordPress. An example of that is it's not immediately present to the average user that if you were to copy the URL of a YouTube link into your editor, that it will just automatically embed the video. You might think you need to use some custom embed script, but WordPress does that for you automatically, which is helpful, but if you don't know it's there, then you'll never use it. And Gutenberg is trying to bring all of that, those types of features up to the surface. Some deficits I can see is personally I feel when I'm writing in it, the creation of the blocks as I'm going feels a little bit like overkill for me. It might just be because I'm not used to it. Custom development is absolutely possible, but I feel that it has a higher bar of entry than a lot of other WordPress editing features. A more common method is using PHP templates and using a metafield tool like Advanced Custom Fields or pods or anything of that nature. Gutenberg is built on an abstracted React. It's very JavaScript heavy, and if you're not familiar with that environment, getting onboarded can be challenging for entry-level developers. And the last bit, this isn't so much a con. I just didn't, maybe I should go right in the middle, but it's an interesting note for me at least that Automatic, the WordPress.com, the heavy patrons of the WordPress community is very, very invested in the development of this tool. Looking at the stats yesterday, the top 10 developers have done 50% of all commits. Seven of those people are Automaticians, and there's more Automaticians getting involved every day. Not to say it's a bad thing, not a good thing, but it is definitely a, I feel, a centrally driven program instead of a sort of organic approach. So this is kind of my litmus test for Gutenberg. Who likes the customizer or doesn't know what the customizer is? Let's raise hands for both of those. Okay. Who doesn't like the customizer, for whatever reason? A couple of you. Okay. I think you're going to have those exact same feelings about Gutenberg. So if you like the customizer, you know how it works, it kind of works with your flow. I think Gutenberg is going to suit your needs. If you don't really like the customizer for whatever reason, my feeling is you're probably going to have similar hang-ups when it comes to Gutenberg. And this is a more in-depth roadmap. I'm not going to go through this. I've shared my slides on Twitter already, so if anyone wants to read all of these, basically these came from Matt Mullenweg during WordCamp Europe. But, you know, the TLDR here is June. Features will be frozen July. We're going to start, they'll start promoting it and getting it out into the universe. August, the goal is to start integrating this with Calypso and start working with different agencies and developers and posts to get this on a number of sites, start bug tracking, bug fixing. And then, in theory, Gutenberg could be in 5.0 as soon as August. Maybe it'll be later. That goal might have changed, I'm not sure yet. So any questions on anything I've just gone over here? Otherwise, I'm just going to dive right into the editor and we'll start looking at some blocks. Nothing? Okay. If anybody does have questions, just start yelling at me. I prefer that instead of having a line of questions at the end. All right, here we go. So here's a very simple portal editor page I made. We're in Boston. I figured I'd talk about some big beans. So here we go. Fairly normal looking blog. This could be done in the regular editor for the most part. Where we start to get unique is when we get into the back end. So I'm going to take a look at my posts. Everything's looking normal so far. And under being town beans, this is where we have the real big change. Is that better? Right. So, so right off the bat, you can see the editor is much different. We don't have a large Microsoft Word document type editor. We have this new sidebar feature, which is different. The title is gone or rather it's been moved. It's just, you know, it's just different. It doesn't, the big thing that you'll notice is on this left sidebar, we have a lot of the stuff that you might commonly expect. So I can apply categories to my blog posts and tags. I can set a featured image. All of this exists currently. It's just been modified. What is different, though, is when we start to poke around at the different elements of this page, not only can we see that there's a highlighter, which outlines the differentiation between each of these blocks. But we see that the sidebar will change as well, based on the editor that we are the block that we are currently editing. So for example, this is an image gallery, we have one set of features, we have a text bar with another set of features, so on and so forth. So what I want to do is I want to take a look at some of the common blocks that I think people will use and then we'll look at adding some new blocks as well. So the first one is the cover image. So if we look at this on the front end, we got an image with a bit of text. Nothing special, but this might be doing an overlay text on an image is maybe not the easiest thing to do in the standard WordPress editor. And this is a new block type that lets you just add a new block with that image. So if I go up here to the plus bar, and I think this is a cover image. So I can do a search for cover image, add my block, open my media library, take my city of Boston, click in and write a title. Bingo, we're done. I can now click on the block sidebar and I can see that I have a few features here. Rather before we look at the sidebar, let's look at these popups. So there are some additional features that you could commonly do with images and everything before as well. This was brought up in the keynote. Everything that kind of comes up right in your editor as you're typing is generally the more important and the more commonly used features. Everything that's in the block sidebar generally can be more specific or more advanced and might not necessarily qualify for the average editing experience. But what we can do here is we could set our text to a right align, left align, center align. We can make our text bold here if we wanted to. We can italicize it. And you can see that the goal here is to create whatever is on the front end of your website inside of the editor at the same time. Additionally, a really cool feature with this is if your theme is enabled to support this, you can also add in wide width banner images and full width banner images. So a great example of that would be like this. So we can have an update, go to our front end. And when we refresh, we now have this really cool banner. Yes. So where's the CSS for that? That is all built into Gutenberg and the theme itself. So I've written nothing special for this. What I'm using for a theme is the Gutenberg boilerplate theme, and the Gutenberg plugin, and I have nothing else installed. Yeah, is there a way to control the vertical alignment of the text? That's great. The questions. Oh, yes. Thank you. The question is, is there a way to change the vertical alignment of the text? I don't believe that there is a way of doing that inside of Gutenberg. But I'm sure that you can write your own CSS. So one more neat feature here is we can also apply a fixed background, which adds a nice little parallax element. And we can also set the background opacity. So, you know, based on the content, you know, or the image, we can make it lighter or darker. So now when I hit update, refresh my page. Now we've got this parallax feature, which is pretty cool. And this is all boilerplate. This is right out of the box. I'm going to skip ahead on this block. Skip that one for now. And while we're on the idea of images, this is a gallery block. So in this case, I have three images, which I want to display are all my being images. I can click in on each of these images individually. And I can add a caption. I could also do the same wide width, medium, full width, left aligns, right aligns. And you can see in this case, how we have some paragraph content down below. It's floated the gallery against the content. Wow. Furthermore, I can also set the number of columns. So in this case, I have three images and two columns. And it says, small image, small image on one row, and then one row is one phase. If I wanted to make this one column, automatically, we've got boom, boom, boom stacked in a row. Or if I wanted to make three columns, they can all be aligned next to each other. So it's a very, very fast way of just laying out these image features. And a lot of this already exists in the current editor, but it's just so much more presentational. Question in the back, is three columns the maximum? No, I believe if you increase the number of images, but let's find out. I don't know the answer to that. I don't see a way to add it from the media library, but upload more images. Here we go. We've got more images that up to seven columns, seven images. So it looks like it scales with your content. Great question. What happens if you type in a higher number? What happens if I type in a higher number? Let's make it 70. Yeah, it goes to two. Great question. Yeah, yeah, we want 70. What the question is, what is the behavior responsibly of the columns? I think a lot of that is probably going to depend on your theme. But let's just take a look at what the boilerplate stuff does. Just stack them all on top of each other. I'm not sure what the theme is doing there. Does it still have 70 in there? No, it says columns four. Good question. I don't have the answer. And it's not a theme I'm accustomed to. I think in this case, there's probably something related to the theme that's affecting it.  It's I'm very impressed. And if you looked at Gutenberg two months ago, it would be very different than what we're seeing today. So I'd be optimistic. So here's another block. This is just a separator is HTML. It's a HR block. But something kind of neat with it is you can change the type of separator you want. So short line, wide line, or dots, dots. But I can just you know, add a little bar, no coding bar. Okay, so let's unshare this block. Okay, so this block is a button block. And if we were to create a new one, insert, search for button. So here, the text field that pops up is what link do I want it to go to. So in this case, I wanted to go to the s colon Google.com. I can also then click into the button and say, go to Google. Which is great. I can now click on the button type. And I can say what type of button I wanted to be. So I wanted to be outlined, or I can be squared. And based on your theme, I would imagine that your theme could create different various button sets for you. And they can make it and cue all of that on your behalf. Another neat feature is you'll see on the right hand side, we have the background color and the text color. And in this case, a few colors have already been predefined by the theme. So this theme wants me to be using these blues and these grays. Or if I really wanted to go buck wild, I could say, I'm going to use a fuchsia. What's kind of great too, is if you change, so we got this fuchsia text here. And, you know, I just love yellow. So let's make my text yellow. Kind of ugly. And Gootberg's going to tell me that, too. So in this case, it's saying that the color combination is hard to read. So, you know, again, this was also brought up in the keynote, but the approach of accessibility has been, I think, well thought out. And also, too, coming from an agency environment, we generally try to remove as many color controls as we can, because, you know, some clients got some real interesting tastes. And I like the idea of giving people that option. But I also really like that it tells you when you're wrong. So I think that's great. Can you add classes to the box? Absolutely. Yeah. So under advanced here. So in this case, is style squared is a class that was added by this button. But I can then change it around as much as I like. Or if I wanted to code my own, I can add a class myself. In there? Yes. Yep. Yeah.  Can you tell it what class you want it to be there? Yep. Yeah. So in this case, I could say, but Oh, I'm sorry. I wasn't seeing the right side of the screen. Oh, sorry. Yeah. Yeah. So it's here in the right side. Okay. All right. Okay, cool. So one other thing I had done with this before that I turned off is this button. So let's pretend this is a, it's a store, and I've got some call to action. And I want for it's maybe a contact us page. And I, you know, thanks for reading my blog. Send me an email if you want to learn more about blah, blah, blah. I like this layout, I like this text. And I want to make it so that if I change it in one place, it will get changed everywhere else I use it. So that allows for what's called shared blocks. So in this case, I can convert this to a shared block. I can name my shared block. So I'll call it CTA button and save it. So now if I go to create a new post, let me update first, if I go here to create a new block and search for CTA, I have my CTA button, and it just automatically added all the colors and everything. And if I click in edit, and I say, go to Google, please. Shit, sure. Yeah, what's that like the yellow white hurts your eyes? Great. So yeah, so we fixed our button in this case. So now if we go back to this other blog post and refresh the page, we should see that our button got updated here as well. Don't be here to save on the other one yet. Well, no, the whole button is here. We added it, edited it, just added again. Or another way instead of just searching is all of the buttons are organized in these different categories. And shared is one of the sections. I'm not going to dwell on this, I'm going to move on. But I admit there are some nuances to this and so figuring out myself. Here's your standard text editor. So this is a paragraph editor. It's going to seem very similar. Text line right, text line left, centerline, bolded, italicized, add a link if we want to. Nothing too wacky here, except for when you start to take a look at the block sidebar. To get rid of these styles, we can now have some default sizes. So I want my text to be large or extra large, or maybe I want it very small. And then I also have a slider so that I can make it as big or as small as I like. There's this drop cap feature, which has been added, which I think adds kind of a stylistic approach. I'm not really sure why it was added into the core feature for this. I'm not sure there's that much need for it. It's kind of interesting. I bet we'll be seeing a lot more drop caps. And then just like with the button before, you know, we can start setting some styles and, you know, some colors if we want to. And again, it will warn us when we're doing something bad. Can you do headings from the paragraph editor? The question is, can you do headings from the paragraph from the paragraph? What? And in this editing block? Yeah. If I'm writing away and want to throw in a heading? Yep. Yeah, okay. So yeah, so how do you do headings? To rephrase the question. Thank you. Headings are their own block as well. Oh, no. So if we increase, if we insert a block here at the plus sign, and search for heading. And so now we have our text for this is a heading. And then we can say it's an H2 or H3 or H4. H1s, I believe would be reserved. So yes, so we can set the different heading types here. H1s are reserved by the page title. Are there dibs around each block? The question is, are there dibs around each block? And yes, there are. Yeah, if you would look at this Gutenberg editor on the front end. So taking a look at the heading here. So in this case, you're probably not gonna see this too well. So in this case, the heading does not have its own block because H3 headings are block type elements. So it doesn't really need one. However, our CTA block button has a class of WP block button. The paragraph text is in a P tag. Down below here, we have an image with a block quote. So we have a figure with block quote, etc. In the front. How did how did editor will behave with page builders like Dave and some others? Yeah, great question. So the question is, how will the this behave with page builders? That's really going to depend on page builder by page builder and how they choose to respond to it. My understanding is that this time, every page builder, every prominent page builder has announced that they have Gutenberg support. That being said, my experience with Gutenberg support support is they turn it off and use their own editor. So yeah, your mileage may vary based on question in the back. The question is, how would you remove elements from the editor and to clarify your question would be if you didn't want something for a client to have access to? So yeah, so you don't want to use center line. You can add and remove themes support for these different features. I know that there are resources on the internet for that. I can't dictate them unfortunately offhand, but I do know that you can modify your themes declarations to add and remove different features. Can you nest blocks like suppose we want to put that heading inside the paragraph block block. So so the whole background be shaded and I have the heading inside that block. Yeah, good question. That's a good segue. Actually, the question is, can you nest blocks? And the answer is kind of yes and no. There is nesting. So this step here, I don't know if you know this bush big beans dog died last week. So this is an example of some nested blocks. My understanding of the history is with Gutenberg is that initially Gutenberg didn't want to be a layout editor. It wanted to be a content editor. And I think that's guided a lot of the philosophy behind Gutenberg for the most part. So, you know, when you look at this site and pretty much every other Gutenberg site out there right now, I think you're going to see very basic single column websites. It's not intended for managing lots of sidebar features and all this other stuff. Floated content like images can work widgets, widgets would be managed through a sidebar, which would be outside of the Gutenberg editor. So it's not intended to be a full blown page editor like diddy wants to be. That being said, there is some support for it. So there is a columns block type, which they say is in beta. And they're very clear about that. It is a little buggy. But here's an example of it. Let's just make a new one. So if I go here, and I do search for columns, we can see right here, it's specifying beta. And in this case, I have two block areas that have been created. If I wanted to have more, increase my column count here up to a maximum of six, but six is a lot. So let's just stick with two. And then inside of here, I can hit the plus sign and start adding in my own things. So in here, maybe I wanted to include, well, let's use my CTA button again. This one over here, we're going to add image search for image. And from the media library, we'll do we'll do buddy again. So in this case, it didn't really, well, it's supposed to be two different that see the blocks didn't even go inside of the columns. So maybe a simpler word. So here we can see column one and then test. So we have each of these different columns. And if we inspect them, we can see the two different divs with their content inside. Honestly, I'm not really clear why when I attempted to add the CTA block inside the column, it injected it same with my image. And I think that's some of the stuff that's still being worked out with this platform. Any other questions? Is there 10? Yep. Can you save blocks that aren't necessarily global? And can you give an example, please? Okay, so the question is, so you have a image with text. You want it to be blue, but now you're changing the text, but you're retaining all the settings. And you want that group of settings to go from page to page page. In that case, I don't believe that this time there's a great way of doing that. What you could do is a make your own custom block. And then I believe you could also do declaration of theme support to say, these are my preferred color palettes. And the onus would then be on the person creating the page to do it. Right. I admit it's not ideal, but it's better than what we currently have. Yes. Is there a way to reorder the blocks and drag them around? Great question. Is there a way to reorder the blocks and drag them around? And the answer is yes. So in this case, we have our heading, and we have our different CTAs. There's these arrows up here, left and right or up and down rather. So if I click it, it'll just move it around for me. And then I can also drag and drop. What's to do it? There we go. Yeah, I just gotta get very, very careful with it. So yeah, yes, you can. Yes. Can you change the spacing between the blocks? Can you change the spacing between the blocks? You cannot do that within the block editor. You would want to do that in your CSS. And as provided that your CSS is included in such a way that it displays both on the front end and in the editor, you'll see those edits as part of your editing experience. Any other questions? Yeah, the document tag describes the settings that feature that are for the post itself. Yeah, the post at large. Yes. Can you create floating blocks as well? Can you create floating blocks as well? Like for images? Yeah, pretty much. Yep. Yes, you can. So here, if I insert a block and do image or we have an inline image, see what that does. That's not going to work there. That's too big. That's why there we go. So this would be an example of like floating. So it's technically its own block. And it kind of looks like it's inside of the paragraph block. But if you were to look at the DOM structure, you would see that it's image and then paragraph. And then by floating it, it's now removed from the DOM paragraph, it's pushed up and then the image is overlaying. Any other questions? Okay. So one other thing or a couple of the things we can look at is so this, this RIP do carry it here. So we covered this a little bit is adding your own CSS. So in this case, if I look at the front end, you can see that we have this gray background with the black border. Right now, this is not being represented inside of Goober. This is a matter of CSS in queuing. So my style sheet is in queue on the front end, meaning it's for all of the visitors to my website. And in an effort to maybe reduce the load time for editors, oftentimes themes will try and not to include front end styles in the editor. As the ecosystem changes, we're going to see all of this change as well. And ideally, what we see in the editor should be the same as what is on the front end of the website. Thank you, five. So, but what I wanted to just give us an example here is so while this isn't the best example, if you go to appearances and the customizer, I've just added some very simple CSS here. And customizer records it. So we can see here we have our block, and I've added some gray, I've added some padding to it, and then I've added the border. And then from here, I can do, you know, pretty much whatever I want, anything you can do with any style sheet you can apply to a Goober block. And I think a lot of the same rules apply with CSS naming structures of the clearance specific. Yes, this is more of just a general question, because I've never thought about it. When you're using the customizer, doesn't that in your styles.css? The question is, when you're using the customizer, doesn't it in your styles.css? I believe it creates its own virtual style sheet, and that style sheet is only inacute on the front end of your website. And that is why my edit here does not work in Goober's editor. Right. But my question is more to the point of, if you're, like, you'll, you'll still see, like, you're within the customizer, you're basically looking at the front end of your website. Yes. So you'll be able to edit and adjust the styles that way, rather than, because within Gutenberg, there's no way to adjust your styles. So does the, in queuing it on the admin side make a difference when you can't see the styles that you're trying to edit? So the question is, does it really make a difference if it's in queue to boil, to boil it down? Yeah. The question is, does it really make a difference if your styles are in queue to Goober? Technically, no. I mean, technically, everybody could be writing an HTML, though, that's not super easy and user friendly. The intent of the project as a whole is to unify the front end and the back end experience into a single cohesive visual process. So that if somebody who doesn't even like updating their website, I mean, how many times have you like done something in the editor and then you look at the front end and it doesn't quite work the way you thought it would. And then you're back and forth and tabbing and refreshing and all that sort of stuff. In theory, if everything's working right, Gutenberg should avoid that whole part of the updating process. Is it necessary or required? No. But I think it would help a lot. Yes. When using Gutenberg, how easy it is to use with tablets touch screens or touch screens with any kind of device? That's a good question. The question is, how is Gutenberg with touch screens, iPads, iPhones, all that, or is any touch device? I've not tried that myself, to be honest. So I can't answer with authority. I do know that effort has been made on the mobile responsiveness of it, which would be touch required. So I would imagine that at least it would work as a, if you can click it, you can touch it. But I would not expect it to have like a two finger pickup and drag the block and throw it up to the top or something like that. But I don't know. And I mean, this is, you're going to hear this 100 times this weekend, but the plugin is available, download it, install it, play with it, break it, make mistakes, I mean, like I am maybe not 100 people. But yeah, it's, it's, I think it's a really exciting project. I'm really optimistic for the future. And I hope everyone else will be too. I don't think we have much time left. So maybe like one or two more questions. There's any you call it good right here. Don't don't make me. All right, thank you very much.