What you'll learn: Fundamentals of an Ecto Changeset. Putting changes, differences between `data` and `changes`, having validations, differences from regular structs Fundamentals of an Ecto Migration. Setting up a database, migrating it, adding indices and constraints, uniqueness, UUID primary keys, relations between tables Fundamentals of Ecto Schema. Casting and casting associations, embedded schemas, assocs with UUID as primary key, belongs_to/has_one/has_many/has_many through Fundamentals of Ecto Multi, transactions, locks in them and batch inserting/updating. insert_all/update_all and their limitations Fundamentals of Ecto Query. Querying for `where` conditions, grouping and ordering by fields Creating a context with example functions to Create Read Update Destroy records (CRUD) Fundamentals of testing changesets and functions that operate on database. Requirements: Basic knowledge of Elixir language Description: Let me guide you through what is a Changeset: how to cast, put changes, validate, know the differences between `data` and `changes` fields. Learn about the difference between structs and Changesets.Let us get into the bridge between Changeset and your database using Phoenix. Learn about Phoenix generators and let's discuss what do they do. Learn about migrations, add indices and contstraints, change integer IDs to UUIDs. Ecto.Schema. Set fields, let's see what are Embedded Schemas by creating embed_one and embeds_many built-in-a-record relations. Associations of all kind (has_one, has_many, has_many through and has_many with UUID as a foreign key),Learn about the Ecto.Repo. How to insert, update, read from and delete records.Lean about Ecto.Query. How to compose a query to get the records you want.Put it all together to a Context module.Seed the initial data for your application. Set up a script to automatically insert over 50.000 fresh database records.Learn about bulk operations. Repo.insert_all/update_all and their limitations.See the power of the Ecto.Multi, database transactions, ensuring data consistency.Test it all: Changesets, all of the Context.The course may be followed along, i don't change the code off the camera. Though the suggested way to do the course is to just watch me talk to you very slowly and showing you around what's possible in Ecto. (
TO MAC USERS: If RAR password doesn't work, use this archive program:
RAR Expander 0.8.5 Beta 4 and extract password protected files without error.
TO WIN USERS: If RAR password doesn't work, use this archive program:
Latest Winrar and extract password protected files without error.