示例#1
0
 def create(self, name, political_party, birthdate):
     values = {
         'name': name,
         'political_party': political_party,
         'birthdate': birthdate
     }
     TransactionHandler.insert(self, table='persons', params=values)
示例#2
0
 def create(self, name, description, established=0, disbanded=0):
     params = {
         'name': name,
         'description': description,
         'established': established,
         'disbanded': disbanded
     }
     print(params)
     TransactionHandler.insert(self, table='ministries', params=params)
示例#3
0
 def save_position(self, role, date_from, date_to, person_id, ministry_id,
                   cabinet_id):
     values = {
         'role': role,
         'date_from': date_from,
         'date_to': date_to,
         'person_id': person_id,
         'ministry_id': ministry_id,
         'cabinet_id': cabinet_id
     }
     TransactionHandler.insert(self, table='positions', params=values)
示例#4
0
 def create(self, title, type, number, file, date):
     # Analyzed is false by default when creating a new issue
     values = {
         'title': title,
         'type': type,
         'number': number,
         'file': file,
         'date': date,
         'analyzed': 0
     }
     TransactionHandler.insert(self, 'issues', values)
示例#5
0
 def create(self, title, description, date_from, date_to):
     params = {'title' : title, 'description' : description, 'date_from' : date_from,
               'date_to' : date_to}
     TransactionHandler.insert(self,table='cabinets',params=params)
示例#6
0
 def create(self, person_name, role, issue_title, issue_date):
     params = {'person_name': person_name, 'role': role, 'issue_title': issue_title, 'issue_date' : issue_date}
     TransactionHandler.insert(self, table='raw_signatures', params=params)
示例#7
0
 def create(self, person_id, issue_id, data):
     params = {'person_id': person_id, 'issue_id': issue_id, 'data': data}
     TransactionHandler.insert(self, table='signatures', params=params)