Beispiel #1
0
def parseRetBooklists(ret):
    booklists = []
    for row in ret:
        name = row[0]
        ID = parseIntListString(row[1])
        booklist = BookList(name, ID)
        booklists.append(booklist)
    return booklists
Beispiel #2
0
def parseRetAuthors(ret):
    authors = []
    for row in ret:
        name = row[0]
        books = parseIntListString(row[1])
        author = Author(name, books)
        authors.append(author)
    return authors
Beispiel #3
0
 def getBooksByAuthor(self, author_name):
     self.connect()
     ret = self.cursor.execute("select * from %s where name='%s'" % (self.author_table, author_name))
     books = []
     for row in ret:
         ID = parseIntListString(row[2])
         books.append(ID)
     self.close()
     return books