Skip to content

Commit

Permalink
Fixed SQL selects in docs/guide/test_database.py example
Browse files Browse the repository at this point in the history
  • Loading branch information
vmagamedov committed Dec 2, 2016
1 parent 1b2da19 commit 859fb40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/guide/test_database.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# setup storage

from sqlalchemy import create_engine, MetaData, Table, Column
from sqlalchemy import Integer, String, ForeignKey
from sqlalchemy import Integer, String, ForeignKey, select

metadata = MetaData()

Expand Down Expand Up @@ -60,12 +60,12 @@ def direct_link(ids):

@pass_context
def to_characters_query(ctx):
query = character_table.select(character_table.c.id)
query = select([character_table.c.id])
return [row.id for row in ctx[SA_ENGINE_KEY].execute(query)]

@pass_context
def to_actors_query(ctx):
query = actor_table.select(actor_table.c.id)
query = select([actor_table.c.id])
return [row.id for row in ctx[SA_ENGINE_KEY].execute(query)]

GRAPH = Graph([
Expand Down

0 comments on commit 859fb40

Please sign in to comment.