Skip to content

Commit 7bc26d1

Browse files
committed
Reran examples with new version
1 parent 8e80eee commit 7bc26d1

File tree

10 files changed

+84
-8
lines changed

10 files changed

+84
-8
lines changed

examples/authors/mysql/query.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,7 @@ WHERE id > ?
3939
ORDER BY id
4040
LIMIT 1000 ;
4141

42+
-- name: CountAuthor :one
43+
-- Count # of Author
44+
SELECT count(*) as author_count from authors ;
45+

examples/authors/postgresql/query.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ WHERE id > @id
4141
ORDER BY id
4242
LIMIT 1000 ;
4343

44+
-- name: CountAuthor :one
45+
-- Count # of Author
46+
SELECT count(*) as author_count from authors ;
47+

examples/authors/sqlite/query.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ WHERE id > @id
4141
ORDER BY id
4242
LIMIT 1000 ;
4343

44+
-- name: CountAuthor :one
45+
-- Count # of Author
46+
SELECT count(*) as author_count from authors ;
47+

examples/booktest/mysql/query.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ WHERE author_id > ?
3535
ORDER BY author_id
3636
LIMIT 1000 ;
3737

38+
-- name: CountAuthor :one
39+
-- Count # of Author
40+
SELECT count(*) as author_count from authors ;
41+
3842
-- name: SelectBook :one
3943
-- Select one Book using book_id
4044
SELECT
@@ -95,3 +99,7 @@ WHERE book_id > ?
9599
ORDER BY book_id
96100
LIMIT 1000 ;
97101

102+
-- name: CountBook :one
103+
-- Count # of Book
104+
SELECT count(*) as book_count from books ;
105+

examples/booktest/postgresql/query.sql

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,16 @@ INSERT INTO authors
3131
RETURNING * ;
3232

3333
-- name: ListAuthor :many
34-
-- Lists 1000 Author having id > ?
34+
-- Lists 1000 Author having id > @author_id
3535
SELECT * FROM authors
3636
WHERE author_id > @author_id
3737
ORDER BY author_id
3838
LIMIT 1000 ;
3939

40+
-- name: CountAuthor :one
41+
-- Count # of Author
42+
SELECT count(*) as author_count from authors ;
43+
4044
-- name: SelectBook :one
4145
-- Select one Book using book_id
4246
SELECT
@@ -93,9 +97,13 @@ INSERT INTO books
9397
RETURNING * ;
9498

9599
-- name: ListBook :many
96-
-- Lists 1000 Book having id > ?
100+
-- Lists 1000 Book having id > @book_id
97101
SELECT * FROM books
98102
WHERE book_id > @book_id
99103
ORDER BY book_id
100104
LIMIT 1000 ;
101105

106+
-- name: CountBook :one
107+
-- Count # of Book
108+
SELECT count(*) as book_count from books ;
109+

examples/booktest/sqlite/query.sql

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,16 @@ INSERT INTO authors
3131
RETURNING * ;
3232

3333
-- name: ListAuthor :many
34-
-- Lists 1000 Author having id > ?
34+
-- Lists 1000 Author having id > @author_id
3535
SELECT * FROM authors
3636
WHERE author_id > @author_id
3737
ORDER BY author_id
3838
LIMIT 1000 ;
3939

40+
-- name: CountAuthor :one
41+
-- Count # of Author
42+
SELECT count(*) as author_count from authors ;
43+
4044
-- name: SelectBook :one
4145
-- Select one Book using book_id
4246
SELECT
@@ -93,9 +97,13 @@ INSERT INTO books
9397
RETURNING * ;
9498

9599
-- name: ListBook :many
96-
-- Lists 1000 Book having id > ?
100+
-- Lists 1000 Book having id > @book_id
97101
SELECT * FROM books
98102
WHERE book_id > @book_id
99103
ORDER BY book_id
100104
LIMIT 1000 ;
101105

106+
-- name: CountBook :one
107+
-- Count # of Book
108+
SELECT count(*) as book_count from books ;
109+

examples/jets/query.sql

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ WHERE id > @id
3737
ORDER BY id
3838
LIMIT 1000 ;
3939

40+
-- name: CountPilot :one
41+
-- Count # of Pilot
42+
SELECT count(*) as pilot_count from pilots ;
43+
4044
-- name: SelectJet :one
4145
-- Select one Jet using id
4246
SELECT
@@ -87,6 +91,10 @@ WHERE id > @id
8791
ORDER BY id
8892
LIMIT 1000 ;
8993

94+
-- name: CountJet :one
95+
-- Count # of Jet
96+
SELECT count(*) as jet_count from jets ;
97+
9098
-- name: SelectLanguage :one
9199
-- Select one Language using id
92100
SELECT
@@ -125,6 +133,10 @@ WHERE id > @id
125133
ORDER BY id
126134
LIMIT 1000 ;
127135

136+
-- name: CountLanguage :one
137+
-- Count # of Language
138+
SELECT count(*) as language_count from languages ;
139+
128140
-- name: SelectPilotLanguage :one
129141
-- Select one PilotLanguage using id
130142
SELECT
@@ -166,3 +178,7 @@ WHERE id > @id
166178
ORDER BY id
167179
LIMIT 1000 ;
168180

181+
-- name: CountPilotLanguage :one
182+
-- Count # of PilotLanguage
183+
SELECT count(*) as pilotlanguage_count from pilot_languages ;
184+

examples/ondeck/mysql/query.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ WHERE id > ?
3838
ORDER BY id
3939
LIMIT 1000 ;
4040

41+
-- name: CountCity :one
42+
-- Count # of City
43+
SELECT count(*) as city_count from city ;
44+
4145
-- name: SelectVenue :one
4246
-- Select one Venue using id
4347
SELECT
@@ -106,3 +110,7 @@ WHERE id > ?
106110
ORDER BY id
107111
LIMIT 1000 ;
108112

113+
-- name: CountVenue :one
114+
-- Count # of Venue
115+
SELECT count(*) as venue_count from venue ;
116+

examples/ondeck/postgresql/query.sql

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ INSERT INTO city
3434
RETURNING * ;
3535

3636
-- name: ListCity :many
37-
-- Lists 1000 City having id > ?
37+
-- Lists 1000 City having id > @id
3838
SELECT * FROM city
3939
WHERE id > @id
4040
ORDER BY id
4141
LIMIT 1000 ;
4242

43+
-- name: CountCity :one
44+
-- Count # of City
45+
SELECT count(*) as city_count from city ;
46+
4347
-- name: SelectVenue :one
4448
-- Select one Venue using id
4549
SELECT
@@ -104,9 +108,13 @@ INSERT INTO venue
104108
RETURNING * ;
105109

106110
-- name: ListVenue :many
107-
-- Lists 1000 Venue having id > ?
111+
-- Lists 1000 Venue having id > @id
108112
SELECT * FROM venue
109113
WHERE id > @id
110114
ORDER BY id
111115
LIMIT 1000 ;
112116

117+
-- name: CountVenue :one
118+
-- Count # of Venue
119+
SELECT count(*) as venue_count from venue ;
120+

examples/ondeck/sqlite/query.sql

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ INSERT INTO city
3434
RETURNING * ;
3535

3636
-- name: ListCity :many
37-
-- Lists 1000 City having id > ?
37+
-- Lists 1000 City having id > @id
3838
SELECT * FROM city
3939
WHERE id > @id
4040
ORDER BY id
4141
LIMIT 1000 ;
4242

43+
-- name: CountCity :one
44+
-- Count # of City
45+
SELECT count(*) as city_count from city ;
46+
4347
-- name: SelectVenue :one
4448
-- Select one Venue using id
4549
SELECT
@@ -104,9 +108,13 @@ INSERT INTO venue
104108
RETURNING * ;
105109

106110
-- name: ListVenue :many
107-
-- Lists 1000 Venue having id > ?
111+
-- Lists 1000 Venue having id > @id
108112
SELECT * FROM venue
109113
WHERE id > @id
110114
ORDER BY id
111115
LIMIT 1000 ;
112116

117+
-- name: CountVenue :one
118+
-- Count # of Venue
119+
SELECT count(*) as venue_count from venue ;
120+

0 commit comments

Comments
 (0)