Results:
$ mix run ./priv/repo/playground.exs
asn1: 5.0.9, compiler: 7.4.1, connection: 1.0.4, crypto: 4.5.1, db_connection: 2.0.5, decimal: 1.6.0, ecto: 3.0.6, ecto_sql: 3.0.5, elixir: 1.8.2, hex: 0.19.0, inets: 7.0.8, jason: 1.1.2, kernel: 6.4, logger: 1.8.2, mariaex: 0.9.1, mix: 1.8.2, music_db: 0.1.0, postgrex: 0.14.1, public_key: 1.6.7, ssl: 9.3.1, stdlib: 3.9.1, telemetry: 0.3.0
11:30:08.264 [debug] QUERY OK source="albums" db=4.7ms decode=0.6ms queue=1.0ms
SELECT a0."id", a0."title", a0."inserted_at", a0."updated_at", a0."artist_id"
FROM "albums" AS a0
WHERE (a0."id" = $1) [3]
11:30:08.270 [debug] QUERY OK source="tracks" db=0.7ms queue=1.2ms
SELECT t0."id", t0."title", t0."duration", t0."index", t0."number_of_plays", t0."inserted_at", t0."updated_at", t0."album_id", t0."album_id"
FROM "tracks" AS t0
WHERE (t0."index" = $1) AND (t0."album_id" = $2)
ORDER BY t0."album_id" [2, 3]
====== TLDNR QUERY: [
%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: [
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 337,
duration_string: nil,
id: 12,
index: 2,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "You Must Believe In Spring",
updated_at: ~N[2019-05-03 00:16:32]
}
],
updated_at: ~N[2019-05-03 00:16:32]
}
]
11:30:08.276 [debug] QUERY OK source="albums" db=1.6ms
SELECT a0."id", a0."title", a0."inserted_at", a0."updated_at", a0."artist_id"
FROM "albums" AS a0
WHERE (a0."id" = $1) [3]
====== JUST THE ONE ALBUM: [
%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
}
]
11:30:08.279 [debug] QUERY OK source="albums" db=1.0ms queue=0.9ms
SELECT a0."id", a0."title", a0."inserted_at", a0."updated_at", a0."artist_id"
FROM "albums" AS a0
INNER JOIN "tracks" AS t1 ON t1."album_id" = a0."id"
WHERE (a0."id" = $1) [3]
====== THE SAME ALBUM FOR EACH OF ITS TRACKS (with ASSOC): [
%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
},
...
%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
}
]
11:30:08.282 [debug] QUERY OK source="albums" db=1.2ms queue=0.9ms
SELECT a0."id", a0."title", a0."inserted_at", a0."updated_at", a0."artist_id"
FROM "albums" AS a0
INNER JOIN "tracks" AS t1 ON a0."id" = t1."album_id"
WHERE (a0."id" = $1) [3]
====== THE SAME ALBUM FOR EACH OF ITS TRACKS (with EXPLICIT JOIN): [
%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
},
...
%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
}
]
11:30:08.285 [debug] QUERY OK source="albums" db=1.0ms queue=0.9ms
SELECT t1."id", t1."title", t1."duration", t1."index", t1."number_of_plays", t1."inserted_at", t1."updated_at", t1."album_id"
FROM "albums" AS a0
INNER JOIN "tracks" AS t1 ON a0."id" = t1."album_id"
WHERE (a0."id" = $1) [3]
====== TRACKS INSTEAD OF ALBUMS: [
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 489,
duration_string: nil,
id: 20,
index: 10,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "All of You",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 454,
duration_string: nil,
id: 19,
index: 9,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Freddie Freeloader",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 485,
duration_string: nil,
id: 18,
index: 8,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Without a Song",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 353,
duration_string: nil,
id: 17,
index: 7,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Theme From M*A*S*H (Suicide Is Painless)",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 292,
duration_string: nil,
id: 16,
index: 6,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Sometime Ago",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 360,
duration_string: nil,
id: 15,
index: 5,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "The Peacocks",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 239,
duration_string: nil,
id: 14,
index: 4,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "We Will Meet Again (for Harry)",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 255,
duration_string: nil,
id: 13,
index: 3,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Gary's Theme",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 337,
duration_string: nil,
id: 12,
index: 2,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "You Must Believe In Spring",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 192,
duration_string: nil,
id: 11,
index: 1,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "B Minor Waltz (for Ellaine)",
updated_at: ~N[2019-05-03 00:16:32]
}
]
11:30:08.288 [debug] QUERY OK source="albums" db=0.8ms queue=0.6ms
SELECT a0."id", a0."title", a0."inserted_at", a0."updated_at", a0."artist_id", t1."id", t1."title", t1."duration", t1."index", t1."number_of_plays", t1."inserted_at", t1."updated_at", t1."album_id"
FROM "albums" AS a0
INNER JOIN "tracks" AS t1 ON a0."id" = t1."album_id"
WHERE (a0."id" = $1) [3]
====== ALBUM WITH EACH TRACK: [
{%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 489,
duration_string: nil,
id: 20,
index: 10,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "All of You",
updated_at: ~N[2019-05-03 00:16:32]
}},
{%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 454,
duration_string: nil,
id: 19,
index: 9,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Freddie Freeloader",
updated_at: ~N[2019-05-03 00:16:32]
}},
{%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 485,
duration_string: nil,
id: 18,
index: 8,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Without a Song",
updated_at: ~N[2019-05-03 00:16:32]
}},
{%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 353,
duration_string: nil,
id: 17,
index: 7,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Theme From M*A*S*H (Suicide Is Painless)",
updated_at: ~N[2019-05-03 00:16:32]
}},
{%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 292,
duration_string: nil,
id: 16,
index: 6,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Sometime Ago",
updated_at: ~N[2019-05-03 00:16:32]
}},
{%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 360,
duration_string: nil,
id: 15,
index: 5,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "The Peacocks",
updated_at: ~N[2019-05-03 00:16:32]
}},
{%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 239,
duration_string: nil,
id: 14,
index: 4,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "We Will Meet Again (for Harry)",
updated_at: ~N[2019-05-03 00:16:32]
}},
{%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 255,
duration_string: nil,
id: 13,
index: 3,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Gary's Theme",
updated_at: ~N[2019-05-03 00:16:32]
}},
{%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 337,
duration_string: nil,
id: 12,
index: 2,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "You Must Believe In Spring",
updated_at: ~N[2019-05-03 00:16:32]
}},
{%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 192,
duration_string: nil,
id: 11,
index: 1,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "B Minor Waltz (for Ellaine)",
updated_at: ~N[2019-05-03 00:16:32]
}}
]
11:30:08.293 [debug] QUERY OK source="albums" db=1.5ms queue=1.1ms
SELECT a0."id", a0."title", a0."inserted_at", a0."updated_at", a0."artist_id", t1."id", t1."title", t1."duration", t1."index", t1."number_of_plays", t1."inserted_at", t1."updated_at", t1."album_id"
FROM "albums" AS a0
INNER JOIN "tracks" AS t1 ON a0."id" = t1."album_id"
WHERE (a0."id" = $1)
AND (t1."index" = $2) [3, 2]
====== ALBUM AND TRACK: [
{%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: #Ecto.Association.NotLoaded<association :tracks is not loaded>,
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 337,
duration_string: nil,
id: 12,
index: 2,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "You Must Believe In Spring",
updated_at: ~N[2019-05-03 00:16:32]
}}
]
11:30:08.296 [debug] QUERY OK source="albums" db=2.0ms
SELECT a0."id", a0."title", a0."inserted_at", a0."updated_at", a0."artist_id"
FROM "albums" AS a0
WHERE (a0."id" = $1) [3]
11:30:08.298 [debug] QUERY OK source="tracks" db=0.7ms queue=1.1ms
SELECT t0."id", t0."title", t0."duration", t0."index", t0."number_of_plays", t0."inserted_at", t0."updated_at", t0."album_id", t0."album_id"
FROM "tracks" AS t0
WHERE (t0."album_id" = $1) ORDER BY t0."album_id" [3]
====== ALL TRACKS CONTAINED BY ALBUM: [
%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: [
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 489,
duration_string: nil,
id: 20,
index: 10,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "All of You",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 454,
duration_string: nil,
id: 19,
index: 9,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Freddie Freeloader",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 485,
duration_string: nil,
id: 18,
index: 8,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Without a Song",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 353,
duration_string: nil,
id: 17,
index: 7,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Theme From M*A*S*H (Suicide Is Painless)",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 292,
duration_string: nil,
id: 16,
index: 6,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Sometime Ago",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 360,
duration_string: nil,
id: 15,
index: 5,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "The Peacocks",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 239,
duration_string: nil,
id: 14,
index: 4,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "We Will Meet Again (for Harry)",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 255,
duration_string: nil,
id: 13,
index: 3,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "Gary's Theme",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 337,
duration_string: nil,
id: 12,
index: 2,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "You Must Believe In Spring",
updated_at: ~N[2019-05-03 00:16:32]
},
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 192,
duration_string: nil,
id: 11,
index: 1,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "B Minor Waltz (for Ellaine)",
updated_at: ~N[2019-05-03 00:16:32]
}
],
updated_at: ~N[2019-05-03 00:16:32]
}
]
11:30:08.299 [debug] QUERY OK source="albums" db=0.2ms
SELECT a0."id", a0."title", a0."inserted_at", a0."updated_at", a0."artist_id"
FROM "albums" AS a0
WHERE (a0."id" = $1) [3]
11:30:08.299 [debug] QUERY OK source="tracks" db=0.2ms
SELECT t0."id", t0."title", t0."duration", t0."index", t0."number_of_plays", t0."inserted_at", t0."updated_at", t0."album_id", t0."album_id"
FROM "tracks" AS t0 WHERE (t0."index" = $1) AND (t0."album_id" = $2)
ORDER BY t0."album_id" [2, 3]
====== ONE TRACK CONTAINED BY ALBUM: [
%MusicDB.Album{
__meta__: #Ecto.Schema.Metadata<:loaded, "albums">,
artist: #Ecto.Association.NotLoaded<association :artist is not loaded>,
artist_id: 2,
genres: #Ecto.Association.NotLoaded<association :genres is not loaded>,
id: 3,
inserted_at: ~N[2019-05-03 00:16:32],
title: "You Must Believe In Spring",
tracks: [
%MusicDB.Track{
__meta__: #Ecto.Schema.Metadata<:loaded, "tracks">,
album: #Ecto.Association.NotLoaded<association :album is not loaded>,
album_id: 3,
duration: 337,
duration_string: nil,
id: 12,
index: 2,
inserted_at: ~N[2019-05-03 00:16:32],
number_of_plays: 0,
title: "You Must Believe In Spring",
updated_at: ~N[2019-05-03 00:16:32]
}
],
updated_at: ~N[2019-05-03 00:16:32]
}
]
:ok
$