FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sqlc-gen-python/examples/src/booktest/query.sql at kyle/sqlc-1-28 · sqlc-dev/sqlc-gen-python · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
sqlc-dev
/
sqlc-gen-python
Public
Notifications
You must be signed in to change notification settings
Fork
50
Star
338
Code
Issues
36
Pull requests
17
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
sqlc-gen-python
/
examples
/
src
/
booktest
/
query.sql
Copy path
More file actions
More file actions
Latest commit
History
History
History
60 lines (52 loc) · 936 Bytes
Breadcrumbs
sqlc-gen-python
/
examples
/
src
/
booktest
/
query.sql
Copy path
File metadata and controls
60 lines (52 loc) · 936 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--
name: GetAuthor :one
SELECT
*
FROM
authors
WHERE
author_id
=
$
1
;
--
name: GetBook :one
SELECT
*
FROM
books
WHERE
book_id
=
$
1
;
--
name: DeleteBook :exec
DELETE
FROM
books
WHERE
book_id
=
$
1
;
--
name: BooksByTitleYear :many
SELECT
*
FROM
books
WHERE
title
=
$
1
AND
year
=
$
2
;
--
name: BooksByTags :many
SELECT
book_id,
title,
name,
isbn,
tags
FROM
books
LEFT JOIN
authors
ON
books
.
author_id
=
authors
.
author_id
WHERE
tags && $
1
::
varchar
[];
--
name: CreateAuthor :one
INSERT INTO
authors (name)
VALUES
($
1
)
RETURNING
*
;
--
name: CreateBook :one
INSERT INTO
books (
author_id,
isbn,
book_type,
title,
year,
available,
tags
)
VALUES
(
$
1
,
$
2
,
$
3
,
$
4
,
$
5
,
$
6
,
$
7
)
RETURNING
*
;
--
name: UpdateBook :exec
UPDATE
books
SET
title
=
$
1
, tags
=
$
2
WHERE
book_id
=
$
3
;
--
name: UpdateBookISBN :exec
UPDATE
books
SET
title
=
$
1
, tags
=
$
2
, isbn
=
$
4
WHERE
book_id
=
$
3
;
Back
|
FazBrowse Home
|
New Git URL