Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

Commit

Permalink
fix: cast to jsonb
Browse files Browse the repository at this point in the history
  • Loading branch information
GetPsyched committed Oct 9, 2023
1 parent d623282 commit 56bdd2d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions database/queries/course.sql
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SELECT
'branch', bs.branch,
'semester', bs.semester,
'credits', bs.credits
)), '[]')::JSON
)), '[]')::JSONB
FROM
branch_specifics AS bs
WHERE
Expand All @@ -66,7 +66,7 @@ SELECT
'branch', bs.branch,
'semester', bs.semester,
'credits', bs.credits
)), '[]')::JSON
)), '[]')::JSONB
FROM
branch_specifics AS bs
WHERE
Expand All @@ -79,11 +79,11 @@ FROM
SELECT
c.*, (
SELECT
JSON_AGG(JSON_BUILD_OBJECT(
COALESCE(JSON_AGG(JSON_BUILD_OBJECT(
'branch', bs.branch,
'semester', bs.semester,
'credits', bs.credits
))
)), '[]')::JSONB
FROM
branch_specifics AS bs
WHERE
Expand All @@ -98,11 +98,11 @@ WHERE
SELECT
c.*, (
SELECT
JSON_AGG(JSON_BUILD_OBJECT(
COALESCE(JSON_AGG(JSON_BUILD_OBJECT(
'branch', bs.branch,
'semester', bs.semester,
'credits', bs.credits
))
)), '[]')::JSONB
FROM
branch_specifics AS bs
WHERE
Expand All @@ -117,11 +117,11 @@ WHERE
SELECT
c.*, (
SELECT
JSON_AGG(JSON_BUILD_OBJECT(
COALESCE(JSON_AGG(JSON_BUILD_OBJECT(
'branch', bs.branch,
'semester', bs.semester,
'credits', bs.credits
))
)), '[]')::JSONB
FROM
branch_specifics AS bs
WHERE
Expand Down

0 comments on commit 56bdd2d

Please sign in to comment.