Skip to content

Commit 045f112

Browse files
committed
revert examples until :copyfrom support is added
1 parent 427171d commit 045f112

File tree

11 files changed

+10
-52
lines changed

11 files changed

+10
-52
lines changed

examples/src/authors/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code generated by sqlc. DO NOT EDIT.
22
# versions:
3-
# sqlc v1.29.0
3+
# sqlc v1.28.0
44
import dataclasses
55
from typing import Optional
66

examples/src/authors/query.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Code generated by sqlc. DO NOT EDIT.
22
# versions:
3-
# sqlc v1.29.0
3+
# sqlc v1.28.0
44
# source: query.sql
5-
from typing import Any, AsyncIterator, Iterator, List, Optional
5+
from typing import AsyncIterator, Iterator, Optional
66

77
import sqlalchemy
88
import sqlalchemy.ext.asyncio
@@ -20,11 +20,6 @@
2020
"""
2121

2222

23-
CREATE_AUTHORS_BATCH = """-- name: create_authors_batch \\:copyfrom
24-
INSERT INTO authors (name, bio) VALUES (:p1, :p2)
25-
"""
26-
27-
2823
DELETE_AUTHOR = """-- name: delete_author \\:exec
2924
DELETE FROM authors
3025
WHERE id = :p1
@@ -57,10 +52,6 @@ def create_author(self, *, name: str, bio: Optional[str]) -> Optional[models.Aut
5752
bio=row[2],
5853
)
5954

60-
def create_authors_batch(self, arg_list: List[Any]) -> int:
61-
result = self._conn.execute(sqlalchemy.text(CREATE_AUTHORS_BATCH), arg_list)
62-
return result.rowcount
63-
6455
def delete_author(self, *, id: int) -> None:
6556
self._conn.execute(sqlalchemy.text(DELETE_AUTHOR), {"p1": id})
6657

@@ -98,10 +89,6 @@ async def create_author(self, *, name: str, bio: Optional[str]) -> Optional[mode
9889
bio=row[2],
9990
)
10091

101-
async def create_authors_batch(self, arg_list: List[Any]) -> int:
102-
result = await self._conn.execute(sqlalchemy.text(CREATE_AUTHORS_BATCH), arg_list)
103-
return result.rowcount
104-
10592
async def delete_author(self, *, id: int) -> None:
10693
await self._conn.execute(sqlalchemy.text(DELETE_AUTHOR), {"p1": id})
10794

examples/src/authors/query.sql

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,3 @@ RETURNING *;
1717
-- name: DeleteAuthor :exec
1818
DELETE FROM authors
1919
WHERE id = $1;
20-
21-
-- name: CreateAuthorsBatch :copyfrom
22-
INSERT INTO authors (name, bio) VALUES ($1, $2);

examples/src/booktest/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code generated by sqlc. DO NOT EDIT.
22
# versions:
3-
# sqlc v1.29.0
3+
# sqlc v1.28.0
44
import dataclasses
55
import datetime
66
import enum

examples/src/booktest/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code generated by sqlc. DO NOT EDIT.
22
# versions:
3-
# sqlc v1.29.0
3+
# sqlc v1.28.0
44
# source: query.sql
55
import dataclasses
66
import datetime

examples/src/jets/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code generated by sqlc. DO NOT EDIT.
22
# versions:
3-
# sqlc v1.29.0
3+
# sqlc v1.28.0
44
import dataclasses
55

66

examples/src/jets/query-building.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code generated by sqlc. DO NOT EDIT.
22
# versions:
3-
# sqlc v1.29.0
3+
# sqlc v1.28.0
44
# source: query-building.sql
55
from typing import AsyncIterator, Optional
66

examples/src/ondeck/city.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code generated by sqlc. DO NOT EDIT.
22
# versions:
3-
# sqlc v1.29.0
3+
# sqlc v1.28.0
44
# source: city.sql
55
from typing import AsyncIterator, Optional
66

examples/src/ondeck/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code generated by sqlc. DO NOT EDIT.
22
# versions:
3-
# sqlc v1.29.0
3+
# sqlc v1.28.0
44
import dataclasses
55
import datetime
66
import enum

examples/src/ondeck/venue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code generated by sqlc. DO NOT EDIT.
22
# versions:
3-
# sqlc v1.29.0
3+
# sqlc v1.28.0
44
# source: venue.sql
55
import dataclasses
66
from typing import AsyncIterator, List, Optional

0 commit comments

Comments
 (0)