-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
394 additions
and
796 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
CREATE OR REPLACE FUNCTION days_date(d days) RETURNS date | ||
LANGUAGE sql | ||
STABLE | ||
AS $$ SELECT d.start_date::date $$; | ||
LANGUAGE sql STABLE | ||
AS $$ SELECT d.start_date::date $$; | ||
ALTER FUNCTION days_date(d days) OWNER TO graphql; | ||
|
||
CREATE OR REPLACE FUNCTION days_events(d days) RETURNS events | ||
LANGUAGE sql STABLE | ||
AS $$ | ||
SELECT e.* | ||
FROM events e | ||
WHERE d.conference_id = e.conference_id | ||
AND e.start_date BETWEEN d.start_date AND d.end_date | ||
ORDER BY e.start_date; | ||
$$; | ||
ALTER FUNCTION days_events(d days) OWNER TO graphql; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.