m_librarian.db module

class m_librarian.db.Author(**kw)[source]

Bases: sqlobject.main.SQLObject

addBook(obj)
books
count
count_idx = <sqlobject.index.SODatabaseIndex object>
full_name_idx = <sqlobject.index.SODatabaseIndex object>
fullname
j = author
misc_name
name
q = author
removeBook(obj)
class sqlmeta(instance)

Bases: sqlobject.main.sqlmeta

childName = None
columnDefinitions = {'count': <IntCol b567fd0cL count>, 'misc_name': <UnicodeCol b568e06cL misc_name>, 'surname': <UnicodeCol b567fc2cL surname>, 'name': <UnicodeCol b568db0cL name>}
columnList = [<SOUnicodeCol surname not null>, <SOUnicodeCol name not null>, <SOUnicodeCol misc_name not null>, <SOIntCol count not null>]
columns = {'count': <SOIntCol count not null>, 'misc_name': <SOUnicodeCol misc_name not null>, 'surname': <SOUnicodeCol surname not null>, 'name': <SOUnicodeCol name not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b563c2acL {'unique': True, 'name': 'full_name_idx', 'columns': (<UnicodeCol b567fc2cL surname>, <UnicodeCol b568db0cL name>, <UnicodeCol b568e06cL misc_name>)}>, <DatabaseIndex b563c2ecL {'name': 'count_idx', 'columns': (<IntCol b567fd0cL count>,)}>]
indexes = [<sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>]
joinDefinitions = [<sqlobject.joins.RelatedJoin object>]
joins = [<sqlobject.joins.SORelatedJoin object>]
soClass

alias of Author

style = <sqlobject.styles.MixedCaseUnderscoreStyle object>
table = 'author'
surname
class m_librarian.db.Book(**kw)[source]

Bases: sqlobject.main.SQLObject

addAuthor(obj)
addGenre(obj)
archive
archive_file_idx = <sqlobject.index.SODatabaseIndex object>
archive_idx = <sqlobject.index.SODatabaseIndex object>
authors
date
date_idx = <sqlobject.index.SODatabaseIndex object>
deleted
deleted_idx = <sqlobject.index.SODatabaseIndex object>
extension
extensionID
extension_idx = <sqlobject.index.SODatabaseIndex object>
file
file_idx = <sqlobject.index.SODatabaseIndex object>
genres
j = book
language
languageID
language_idx = <sqlobject.index.SODatabaseIndex object>
lib_id
q = book
removeAuthor(obj)
removeGenre(obj)
ser_no
ser_no_idx = <sqlobject.index.SODatabaseIndex object>
series
series_idx = <sqlobject.index.SODatabaseIndex object>
size
size_idx = <sqlobject.index.SODatabaseIndex object>
class sqlmeta(instance)

Bases: sqlobject.main.sqlmeta

childName = None
columnDefinitions = {'extensionID': <ForeignKey b564948cL extension>, 'title': <UnicodeCol b56492ecL title>, 'deleted': <BoolCol b564946cL deleted>, 'series': <UnicodeCol b563c74cL series>, 'languageID': <ForeignKey b56494ccL language>, 'ser_no': <IntCol b56493ccL ser_no>, 'file': <StringCol b564940cL file>, 'lib_id': <StringCol b564944cL lib_id>, 'date': <DateCol b56494acL date>, 'archive': <StringCol b56493ecL archive>, 'size': <IntCol b564942cL size>}
columnList = [<SOUnicodeCol title not null>, <SOUnicodeCol series not null>, <SOIntCol ser_no>, <SOStringCol archive not null>, <SOStringCol file not null>, <SOIntCol size not null>, <SOStringCol lib_id not null>, <SOBoolCol deleted not null>, <SOForeignKey extensionID connected to Extension not null>, <SODateCol date not null>, <SOForeignKey languageID connected to Language>]
columns = {'extensionID': <SOForeignKey extensionID connected to Extension not null>, 'title': <SOUnicodeCol title not null>, 'deleted': <SOBoolCol deleted not null>, 'series': <SOUnicodeCol series not null>, 'languageID': <SOForeignKey languageID connected to Language>, 'ser_no': <SOIntCol ser_no>, 'file': <SOStringCol file not null>, 'lib_id': <SOStringCol lib_id not null>, 'date': <SODateCol date not null>, 'archive': <SOStringCol archive not null>, 'size': <SOIntCol size not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b56494ecL {'name': 'title_idx', 'columns': (<UnicodeCol b56492ecL title>,)}>, <DatabaseIndex b56493acL {'name': 'series_idx', 'columns': (<UnicodeCol b563c74cL series>,)}>, <DatabaseIndex b564952cL {'name': 'ser_no_idx', 'columns': (<IntCol b56493ccL ser_no>,)}>, <DatabaseIndex b564956cL {'name': 'archive_idx', 'columns': (<StringCol b56493ecL archive>,)}>, <DatabaseIndex b56495acL {'unique': True, 'name': 'archive_file_idx', 'columns': (<StringCol b56493ecL archive>, <StringCol b564940cL file>)}>, <DatabaseIndex b56495ccL {'name': 'file_idx', 'columns': (<StringCol b564940cL file>,)}>, <DatabaseIndex b564960cL {'name': 'size_idx', 'columns': (<IntCol b564942cL size>,)}>, <DatabaseIndex b564964cL {'name': 'deleted_idx', 'columns': (<BoolCol b564946cL deleted>,)}>, <DatabaseIndex b564968cL {'name': 'extension_idx', 'columns': (<ForeignKey b564948cL extension>,)}>, <DatabaseIndex b56496ccL {'name': 'date_idx', 'columns': (<DateCol b56494acL date>,)}>, <DatabaseIndex b564970cL {'name': 'language_idx', 'columns': (<ForeignKey b56494ccL language>,)}>]
indexes = [<sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>]
joinDefinitions = [<sqlobject.joins.RelatedJoin object>, <sqlobject.joins.RelatedJoin object>]
joins = [<sqlobject.joins.SORelatedJoin object>, <sqlobject.joins.SORelatedJoin object>]
soClass

alias of Book

style = <sqlobject.styles.MixedCaseUnderscoreStyle object>
table = 'book'
title
title_idx = <sqlobject.index.SODatabaseIndex object>
class m_librarian.db.Extension(**kw)[source]

Bases: sqlobject.main.SQLObject

classmethod byName(val, connection=None)
count
count_idx = <sqlobject.index.SODatabaseIndex object>
j = extension
name
q = extension
class sqlmeta(instance)

Bases: sqlobject.main.sqlmeta

childName = None
columnDefinitions = {'count': <IntCol b565514cL count>, 'name': <UnicodeCol b56550ccL name>}
columnList = [<SOUnicodeCol name not null>, <SOIntCol count not null>]
columns = {'count': <SOIntCol count not null>, 'name': <SOUnicodeCol name not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b565518cL {'name': 'count_idx', 'columns': (<IntCol b565514cL count>,)}>]
indexes = [<sqlobject.index.SODatabaseIndex object>]
joinDefinitions = []
joins = []
soClass

alias of Extension

style = <sqlobject.styles.MixedCaseUnderscoreStyle object>
table = 'extension'
class m_librarian.db.Genre(**kw)[source]

Bases: sqlobject.main.SQLObject

addBook(obj)
books
classmethod byName(val, connection=None)
count
count_idx = <sqlobject.index.SODatabaseIndex object>
j = genre
name
q = genre
removeBook(obj)
class sqlmeta(instance)

Bases: sqlobject.main.sqlmeta

childName = None
columnDefinitions = {'count': <IntCol b56555ccL count>, 'name': <UnicodeCol b56555ecL name>, 'title': <UnicodeCol b56555acL title>}
columnList = [<SOUnicodeCol name not null>, <SOUnicodeCol title not null>, <SOIntCol count not null>]
columns = {'count': <SOIntCol count not null>, 'name': <SOUnicodeCol name not null>, 'title': <SOUnicodeCol title not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b56554ccL {'name': 'title_idx', 'columns': (<UnicodeCol b56555acL title>,)}>, <DatabaseIndex b565566cL {'name': 'count_idx', 'columns': (<IntCol b56555ccL count>,)}>]
indexes = [<sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>]
joinDefinitions = [<sqlobject.joins.RelatedJoin object>]
joins = [<sqlobject.joins.SORelatedJoin object>]
soClass

alias of Genre

style = <sqlobject.styles.MixedCaseUnderscoreStyle object>
table = 'genre'
title
title_idx = <sqlobject.index.SODatabaseIndex object>
class m_librarian.db.Language(**kw)[source]

Bases: sqlobject.main.SQLObject

classmethod byName(val, connection=None)
count
count_idx = <sqlobject.index.SODatabaseIndex object>
j = language
name
q = language
class sqlmeta(instance)

Bases: sqlobject.main.sqlmeta

childName = None
columnDefinitions = {'count': <IntCol b5655c8cL count>, 'name': <UnicodeCol b5655becL name>}
columnList = [<SOUnicodeCol name not null>, <SOIntCol count not null>]
columns = {'count': <SOIntCol count not null>, 'name': <SOUnicodeCol name not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b5655cacL {'name': 'count_idx', 'columns': (<IntCol b5655c8cL count>,)}>]
indexes = [<sqlobject.index.SODatabaseIndex object>]
joinDefinitions = []
joins = []
soClass

alias of Language

style = <sqlobject.styles.MixedCaseUnderscoreStyle object>
table = 'language'
class m_librarian.db.AuthorBook(**kw)[source]

Bases: sqlobject.main.SQLObject

author
authorID
author_idx = <sqlobject.index.SODatabaseIndex object>
book
bookID
book_idx = <sqlobject.index.SODatabaseIndex object>
j = author_book
main_idx = <sqlobject.index.SODatabaseIndex object>
q = author_book
class sqlmeta(instance)

Bases: sqlobject.main.sqlmeta

childName = None
columnDefinitions = {'authorID': <ForeignKey b563cc8cL author>, 'bookID': <ForeignKey b563cc2cL book>}
columnList = [<SOForeignKey authorID connected to Author not null>, <SOForeignKey bookID connected to Book not null>]
columns = {'authorID': <SOForeignKey authorID connected to Author not null>, 'bookID': <SOForeignKey bookID connected to Book not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b563c4ecL {'name': 'author_idx', 'columns': (<ForeignKey b563cc8cL author>,)}>, <DatabaseIndex b563ccecL {'name': 'book_idx', 'columns': (<ForeignKey b563cc2cL book>,)}>, <DatabaseIndex b563cd2cL {'unique': True, 'name': 'main_idx', 'columns': (<ForeignKey b563cc8cL author>, <ForeignKey b563cc2cL book>)}>]
indexes = [<sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>]
joinDefinitions = []
joins = []
soClass

alias of AuthorBook

style = <sqlobject.styles.MixedCaseUnderscoreStyle object>
table = 'author_book'
class m_librarian.db.BookGenre(**kw)[source]

Bases: sqlobject.main.SQLObject

book
bookID
book_idx = <sqlobject.index.SODatabaseIndex object>
genre
genreID
genre_idx = <sqlobject.index.SODatabaseIndex object>
j = book_genre
main_idx = <sqlobject.index.SODatabaseIndex object>
q = book_genre
class sqlmeta(instance)

Bases: sqlobject.main.sqlmeta

childName = None
columnDefinitions = {'genreID': <ForeignKey b5653aacL genre>, 'bookID': <ForeignKey b5653b0cL book>}
columnList = [<SOForeignKey bookID connected to Book not null>, <SOForeignKey genreID connected to Genre not null>]
columns = {'genreID': <SOForeignKey genreID connected to Genre not null>, 'bookID': <SOForeignKey bookID connected to Book not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b5653a2cL {'name': 'book_idx', 'columns': (<ForeignKey b5653b0cL book>,)}>, <DatabaseIndex b565398cL {'name': 'genre_idx', 'columns': (<ForeignKey b5653aacL genre>,)}>, <DatabaseIndex b5653a8cL {'unique': True, 'name': 'main_idx', 'columns': (<ForeignKey b5653b0cL book>, <ForeignKey b5653aacL genre>)}>]
indexes = [<sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>]
joinDefinitions = []
joins = []
soClass

alias of BookGenre

style = <sqlobject.styles.MixedCaseUnderscoreStyle object>
table = 'book_genre'
m_librarian.db.open_db(db_uri=None)[source]
m_librarian.db.init_db()[source]
m_librarian.db.insert_name(table, name, **kw)[source]
m_librarian.db.insert_author(surname, name, misc_name)[source]
m_librarian.db.update_counters()[source]