code: def insert(self, fields, values):
          '''
          insert new db entry
  
          :param fields: list of fields to insert
          :param values: list of values to insert
          :return: row id of the new row
          '''
          if fields:
              _fields = ' (%s) ' % ','.join(fields)
          else:
              _fields = ''
          _values = ','.join('?' * len(values))
          query = '''
          INSERT INTO %s %s VALUES (%s)
          ''' % (self._name, _fields, _values)
          self._cursor.execute(query, tuple(values))
          self._connection.commit()
          return self._cursor.lastrowif insert(self, fields, values):
          '''
          insert new db entry
  
          :param fields: list of fields to insert
          :param values: list of values to insert
          :return: row id of the new row
          '''
          if fields:
              _fields = ' (%s) ' % ','.join(fields)
          else:
              _fields = ''
          _values = ','.join('?' * len(values))
          query = '''
          INSERT INTO %s %s VALUES (%s)
          ''' % (self._name, _fields, _values)
          self._cursor.execute(query, tuple(values))
          self._connection.commit()
          return self._cursor.lastrowid
docs: insert new db entry
  
          :param fields: list of fields to insert
          :param values: list of values to insert
          :return: row id of the new row