-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.py
40 lines (24 loc) · 831 Bytes
/
examples.py
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
"""
This shows example on how to use sajilo orm .
"""
from email.policy import default
from sajilo_orm.models import DamiModel
from sajilo_orm.field import Column
from sajilo_orm.manager import BaseManager
from sajilo_orm.settings import DB_SETTINGS
BaseManager.DB_SETTINGS = DB_SETTINGS
from sajilo_orm.models import DamiModel
class Player(DamiModel):
table_ko_naam = "boy"
name = Column("string", max_length="50",null=False)
name = Column("string",null=False)
age = Column("anka",null=True,default=34)
match_played = Column("miti")
aja_date = Column("miti",default='aja_ko_date')
won = Column("ho_ki_haina",default=True,max_length="34")
def main():
#some operations you can perform with sajilo
# create table
Player.bata.table_banau()
if __name__ == "__main__":
main()