Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Expands this example to include a normal column, inserting, and querying.
  • Loading branch information
montsamu authored Dec 4, 2024
1 parent 0d48a08 commit 2bf45f8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,17 @@ users_table = sqlalchemy.Table(
server_default=user_id_seq.next_value(),
primary_key=True,
),
sqlalchemy.Column(
'name',
sqlalchemy.String(30)
)
)
metadata.create_all(bind=engine)
with engine.begin() as conn:
conn.execute(sqlalchemy.text("insert into users(name) values(:name)"), [{"name":"Sam"},{"name":"Dave"}])
with engine.connect() as conn:
for row in conn.execute(sqlalchemy.text("select * from users")):
print(row)
```

### Pandas `read_sql()` chunksize
Expand Down

0 comments on commit 2bf45f8

Please sign in to comment.