Пример #1
0
 class Band(Table):
     manager = ForeignKey("..example_app.tables.Manager", null=True)
Пример #2
0
class Band1(Table):
    manager = ForeignKey(references=Manager)
Пример #3
0
class Concert(Table):
    band_1 = ForeignKey(Band)
    band_2 = ForeignKey(Band)
    venue = ForeignKey(Venue)
    starts = Timestamp()
    duration = Interval()
Пример #4
0
class Ticket(Table):
    concert = ForeignKey(Concert)
    price = Numeric(digits=(5, 2))
Пример #5
0
class Role(Table):
    movie = ForeignKey(Movie)
    name = Varchar(length=100)
Пример #6
0
class Band(Table):
    name = Varchar(length=50)
    manager = ForeignKey(references=Manager, null=True)
    popularity = Integer()
Пример #7
0
class BandD(Table):
    manager = ForeignKey(references=f"{__name__}.Manager")
Пример #8
0
 class BandRelative(Table, tablename="band"):
     manager = ForeignKey("..example_app.tables.Manager", null=True)
Пример #9
0
class Concert(Table):
    band_1 = ForeignKey(Band)
    band_2 = ForeignKey(Band)
    venue = ForeignKey(Venue)
Пример #10
0
class BandC(Table):
    manager = ForeignKey(references=LazyTableReference(
        table_class_name="Manager", module_path=__name__))
Пример #11
0
class Band(Table):
    name = Varchar(length=50)
    manager = ForeignKey(Manager, null=True)
    popularity = Integer(default=0)
Пример #12
0
class BandA(Table):
    name = Varchar()
    manager = ForeignKey(ManagerA, target_column=ManagerA.name)
Пример #13
0
class Band(Table):
    name = Varchar()
    manager = ForeignKey(Manager, target_column="name")
Пример #14
0
class Band2(Table):
    manager = ForeignKey(references="Manager")
Пример #15
0
class Manager(Table):
    name = Varchar()
    manager = ForeignKey("self")
Пример #16
0
class Band4(Table):
    manager = ForeignKey(references="tests.columns.test_foreignkey.Manager")
Пример #17
0
class BandC(Table, tablename="band"):
    manager = ForeignKey(references=f"{__name__}.Manager")