Database

Lucid

9 Series
134 Lessons
36h 23m

Lucid is AdonisJS' Object Relational Mapping (ORM). It's a first-party package that follows the active record pattern. With it you can easily perform CRUD operations, add database hooks, normalize data, and so much more.

Lessons.

Video preview
Umapped and Computed Model Properties
Let's Learn AdonisJS 6 #4.10
・
Mar 05, 24

Unmapped and Computed Model Properties

In this lesson, we'll learn how to add unmapped and computed properties to our Lucid Models. We'll discuss the differences between a model column, unmapped property, and a computed property.

Video preview
Querying Our Movies with the Query Builder
Let's Learn AdonisJS 6 #4.9
・
Mar 05, 24

Querying Our Movies with the Query Builder

In this lesson, we'll introduce both the database and model query builder. We'll learn the differences between the two and the basics of how to use them.

Video preview
Fake Data Factories
Let's Learn AdonisJS 6 #4.8
・
Mar 02, 24

Stubbing Fake Data with Model Factories

In this lesson, we'll learn how we can quickly and easily bulk-create dummy/fake data within our database for each of our Lucid Models using Model Factories

Video preview
Defining Required Data with Seeders
Let's Learn AdonisJS 6 #4.7
・
Mar 02, 24

Defining Required Data with Seeders

Our database will have specific, non-changing, roles and movie statuses. In this lesson, we'll learn how we can quickly and easily create these records inside of our database using seeders.

Video preview
The Basics of CRUD
Let's Learn AdonisJS 6 #4.6
・
Mar 02, 24

The Basics of CRUD

In this lesson, we'll walk through the basics of creating, reading, updating, and deleting (CRUD) data from our database using our Lucid Models.

Video preview
Defining Our Models
Let's Learn AdonisJS 6 #4.5
・
Feb 28, 24

Defining Our Models

In this lesson, we'll walk through the process of defining all our database tables and columns as models and properties within our application.

Video preview
Introducing Lucid Models
Let's Learn AdonisJS 6 #4.4
・
Feb 28, 24

Introducing Lucid Models

In this lesson, we'll introduce models using the Lucid ORM. We'll learn how we can map database columns to our model properties and specify special behavior for our date time columns.

Video preview
The Flow of Migrations
Let's Learn AdonisJS 6 #4.3
・
Feb 24, 24

The Flow of Migrations

In this lesson, we'll learn about the various migration-based commands made available by the Ace CLI and how they interact with our migration files. We'll use these commands to run, rollback, and refresh our migrations against our database.

Video preview
Let's Learn AdonisJS 6 #4.2
・
Feb 24, 24

Introducing and Defining Database Migrations

In this lesson, we'll introduce database migrations. We'll learn what they are, why they're great to have, and how we can create and use them to define our database tables and their columns.

Video preview
Let's Learn AdonisJS 6 #4.1
・
Feb 21, 24

Understanding our Database Schema

In this lesson, we'll walk through how to understand a database schema diagram. We'll then discuss the schema we'll be working with throughout this series; describing the tables, columns, data types, and relationships.

Video preview
Configuring Lucid and our Database Connection
Let's Learn AdonisJS 6 #4.0
・
Feb 21, 24

Configuring Lucid and our Database Connection

In this lesson, we'll learn how we can configure Lucid to use a different driver other than SQLite; PostgreSQL is shown but MySQL and MSSQL are much the same. Then, we'll set up our connection details so that we can successfully connect to our database.

Video preview
Structuring Data with Models
Let's Learn AdonisJS 6 #2.11
・
Jan 31, 24

Defining A Structure for our Movie using Models

In this lesson, we'll introduce the concept of models by using one to define the properties our movies should contain. We'll then stub some methods that will mock calls we'll later be able to use to load data from our database.

Video preview
Model vs Database
Let's Learn AdonisJS 5 #6.2
・
Dec 28, 23

Model vs Database Query Builder

In this lesson, we'll take a look at the differences between the model and database query builders.

Video preview
Adocasts Plus Exclusive
Exclusive
Mixins and Compose
Dec 17, 23

A Deep Dive Into Mixins & Compose

In this lesson, we'll walk through what mixins are and how they work by first inspecting them as plain objects then working our way into classes then finally TypeScript. We'll then implement mixins via AdonisJS' compose utility.

Video preview
Limiting, Sorting, and Pagination
Let's Learn AdonisJS 5 #6.1
・
Dec 08, 23

Limiting, Sorting, & Pagination with the Query Builder

In this lesson, we'll take a look at the various options we have to limit results when using the query builder including first, firstOrFail, limit, and pagination. We'll also learn how we can sort our results.

Video preview
Introducing the Query Builder
Let's Learn AdonisJS 5 #6.0
・
Nov 26, 23

Intro to the Query Builder & It's Where Statements

In this lesson, we'll introduce the query builder. We'll spend most of our time looking at its various where statement options and how we can use them to build queries.

Logging User Actions
AdonisJS Quick Tip #18.0
・
Jul 09, 23

How To Use AdonisJS Model Hooks To Log All User Actions

In this lesson, we’ll be taking a look at how we can log any and every user action performed against our AdonisJS models.

AdonisJS Filter Form Handler
HTMX & AdonisJS Filters #3.0
・
Mar 26, 23

Defining Our AdonisJS Filter Form Handler

In this lesson, we'll expand on the filter query we built in the last lesson by reusing the query within a service for our filter form handler.

HTMX & AdonisJS Filters #2.0
・
Mar 26, 23

Creating Our Filter Query with AdonisJS

In this lesson, we'll create the route and query we'll need to get filtered results with our filter form using the Lucid ORM and AdonisJS.

AdonisJS Model Query Builder Macro Favorites
AdonisJS Quick Tip #16.0
・
Mar 12, 23

Exploring My Favorite AdonisJS Model Query Builder Macros: Tips and Examples

In this lesson, I'll highlight a few of my favorite Model Query Builder Macros that I carry with me from project to project. Have a favorite of your own? Let me know in the comments!

Showing 81 to 100 of 132 results