Skip to content

Commit

Permalink
Reran examples with new version
Browse files Browse the repository at this point in the history
  • Loading branch information
kaashyapan committed May 29, 2023
1 parent 8e80eee commit 7bc26d1
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 8 deletions.
4 changes: 4 additions & 0 deletions examples/authors/mysql/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ WHERE id > ?
ORDER BY id
LIMIT 1000 ;

-- name: CountAuthor :one
-- Count # of Author
SELECT count(*) as author_count from authors ;

4 changes: 4 additions & 0 deletions examples/authors/postgresql/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ WHERE id > @id
ORDER BY id
LIMIT 1000 ;

-- name: CountAuthor :one
-- Count # of Author
SELECT count(*) as author_count from authors ;

4 changes: 4 additions & 0 deletions examples/authors/sqlite/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ WHERE id > @id
ORDER BY id
LIMIT 1000 ;

-- name: CountAuthor :one
-- Count # of Author
SELECT count(*) as author_count from authors ;

8 changes: 8 additions & 0 deletions examples/booktest/mysql/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ WHERE author_id > ?
ORDER BY author_id
LIMIT 1000 ;

-- name: CountAuthor :one
-- Count # of Author
SELECT count(*) as author_count from authors ;

-- name: SelectBook :one
-- Select one Book using book_id
SELECT
Expand Down Expand Up @@ -95,3 +99,7 @@ WHERE book_id > ?
ORDER BY book_id
LIMIT 1000 ;

-- name: CountBook :one
-- Count # of Book
SELECT count(*) as book_count from books ;

12 changes: 10 additions & 2 deletions examples/booktest/postgresql/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@ INSERT INTO authors
RETURNING * ;

-- name: ListAuthor :many
-- Lists 1000 Author having id > ?
-- Lists 1000 Author having id > @author_id
SELECT * FROM authors
WHERE author_id > @author_id
ORDER BY author_id
LIMIT 1000 ;

-- name: CountAuthor :one
-- Count # of Author
SELECT count(*) as author_count from authors ;

-- name: SelectBook :one
-- Select one Book using book_id
SELECT
Expand Down Expand Up @@ -93,9 +97,13 @@ INSERT INTO books
RETURNING * ;

-- name: ListBook :many
-- Lists 1000 Book having id > ?
-- Lists 1000 Book having id > @book_id
SELECT * FROM books
WHERE book_id > @book_id
ORDER BY book_id
LIMIT 1000 ;

-- name: CountBook :one
-- Count # of Book
SELECT count(*) as book_count from books ;

12 changes: 10 additions & 2 deletions examples/booktest/sqlite/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@ INSERT INTO authors
RETURNING * ;

-- name: ListAuthor :many
-- Lists 1000 Author having id > ?
-- Lists 1000 Author having id > @author_id
SELECT * FROM authors
WHERE author_id > @author_id
ORDER BY author_id
LIMIT 1000 ;

-- name: CountAuthor :one
-- Count # of Author
SELECT count(*) as author_count from authors ;

-- name: SelectBook :one
-- Select one Book using book_id
SELECT
Expand Down Expand Up @@ -93,9 +97,13 @@ INSERT INTO books
RETURNING * ;

-- name: ListBook :many
-- Lists 1000 Book having id > ?
-- Lists 1000 Book having id > @book_id
SELECT * FROM books
WHERE book_id > @book_id
ORDER BY book_id
LIMIT 1000 ;

-- name: CountBook :one
-- Count # of Book
SELECT count(*) as book_count from books ;

16 changes: 16 additions & 0 deletions examples/jets/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ WHERE id > @id
ORDER BY id
LIMIT 1000 ;

-- name: CountPilot :one
-- Count # of Pilot
SELECT count(*) as pilot_count from pilots ;

-- name: SelectJet :one
-- Select one Jet using id
SELECT
Expand Down Expand Up @@ -87,6 +91,10 @@ WHERE id > @id
ORDER BY id
LIMIT 1000 ;

-- name: CountJet :one
-- Count # of Jet
SELECT count(*) as jet_count from jets ;

-- name: SelectLanguage :one
-- Select one Language using id
SELECT
Expand Down Expand Up @@ -125,6 +133,10 @@ WHERE id > @id
ORDER BY id
LIMIT 1000 ;

-- name: CountLanguage :one
-- Count # of Language
SELECT count(*) as language_count from languages ;

-- name: SelectPilotLanguage :one
-- Select one PilotLanguage using id
SELECT
Expand Down Expand Up @@ -166,3 +178,7 @@ WHERE id > @id
ORDER BY id
LIMIT 1000 ;

-- name: CountPilotLanguage :one
-- Count # of PilotLanguage
SELECT count(*) as pilotlanguage_count from pilot_languages ;

8 changes: 8 additions & 0 deletions examples/ondeck/mysql/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ WHERE id > ?
ORDER BY id
LIMIT 1000 ;

-- name: CountCity :one
-- Count # of City
SELECT count(*) as city_count from city ;

-- name: SelectVenue :one
-- Select one Venue using id
SELECT
Expand Down Expand Up @@ -106,3 +110,7 @@ WHERE id > ?
ORDER BY id
LIMIT 1000 ;

-- name: CountVenue :one
-- Count # of Venue
SELECT count(*) as venue_count from venue ;

12 changes: 10 additions & 2 deletions examples/ondeck/postgresql/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ INSERT INTO city
RETURNING * ;

-- name: ListCity :many
-- Lists 1000 City having id > ?
-- Lists 1000 City having id > @id
SELECT * FROM city
WHERE id > @id
ORDER BY id
LIMIT 1000 ;

-- name: CountCity :one
-- Count # of City
SELECT count(*) as city_count from city ;

-- name: SelectVenue :one
-- Select one Venue using id
SELECT
Expand Down Expand Up @@ -104,9 +108,13 @@ INSERT INTO venue
RETURNING * ;

-- name: ListVenue :many
-- Lists 1000 Venue having id > ?
-- Lists 1000 Venue having id > @id
SELECT * FROM venue
WHERE id > @id
ORDER BY id
LIMIT 1000 ;

-- name: CountVenue :one
-- Count # of Venue
SELECT count(*) as venue_count from venue ;

12 changes: 10 additions & 2 deletions examples/ondeck/sqlite/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ INSERT INTO city
RETURNING * ;

-- name: ListCity :many
-- Lists 1000 City having id > ?
-- Lists 1000 City having id > @id
SELECT * FROM city
WHERE id > @id
ORDER BY id
LIMIT 1000 ;

-- name: CountCity :one
-- Count # of City
SELECT count(*) as city_count from city ;

-- name: SelectVenue :one
-- Select one Venue using id
SELECT
Expand Down Expand Up @@ -104,9 +108,13 @@ INSERT INTO venue
RETURNING * ;

-- name: ListVenue :many
-- Lists 1000 Venue having id > ?
-- Lists 1000 Venue having id > @id
SELECT * FROM venue
WHERE id > @id
ORDER BY id
LIMIT 1000 ;

-- name: CountVenue :one
-- Count # of Venue
SELECT count(*) as venue_count from venue ;

0 comments on commit 7bc26d1

Please sign in to comment.