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 b5e9016cL count>, 'misc_name': <UnicodeCol b5e906ccL misc_name>, 'name': <UnicodeCol b5e7778cL name>, 'surname': <UnicodeCol b5e776acL surname>}
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>, 'name': <SOUnicodeCol name not null>, 'surname': <SOUnicodeCol surname not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b5e3190cL {'unique': True, 'name': 'full_name_idx', 'columns': (<UnicodeCol b5e776acL surname>, <UnicodeCol b5e7778cL name>, <UnicodeCol b5e906ccL misc_name>)}>, <DatabaseIndex b5e3194cL {'name': 'count_idx', 'columns': (<IntCol b5e9016cL count>,)}>]
indexes = [<sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>]
joinDefinitions = [<sqlobject.joins.RelatedJoin object>]
joins = [<sqlobject.joins.SORelatedJoin object>]
soClass

alias of m_librarian.db.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>
author1
author_list
authors
date
date_idx = <sqlobject.index.SODatabaseIndex object>
deleted
deleted_idx = <sqlobject.index.SODatabaseIndex object>
ext
extension
extensionID
extension_idx = <sqlobject.index.SODatabaseIndex object>
file
file_idx = <sqlobject.index.SODatabaseIndex object>
genre1name
genre1title
genre_name_list
genre_title_list
genres
j = book
lang
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 = {'archive': <StringCol b5e42b8cL archive>, 'date': <DateCol b5e42c4cL date>, 'deleted': <BoolCol b5e42c0cL deleted>, 'extensionID': <ForeignKey b5e42c2cL extension>, 'file': <UnicodeCol b5e42bacL file>, 'languageID': <ForeignKey b5e42c6cL language>, 'lib_id': <StringCol b5e42becL lib_id>, 'ser_no': <IntCol b5e42b6cL ser_no>, 'series': <UnicodeCol b5e42b4cL series>, 'size': <IntCol b5e42bccL size>, 'title': <UnicodeCol b5e4246cL title>}
columnList = [<SOUnicodeCol title not null>, <SOUnicodeCol series not null>, <SOIntCol ser_no>, <SOStringCol archive not null>, <SOUnicodeCol 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 = {'archive': <SOStringCol archive not null>, 'date': <SODateCol date not null>, 'deleted': <SOBoolCol deleted not null>, 'extensionID': <SOForeignKey extensionID connected to Extension not null>, 'file': <SOUnicodeCol file not null>, 'languageID': <SOForeignKey languageID connected to Language>, 'lib_id': <SOStringCol lib_id not null>, 'ser_no': <SOIntCol ser_no>, 'series': <SOUnicodeCol series not null>, 'size': <SOIntCol size not null>, 'title': <SOUnicodeCol title not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b5e42c8cL {'name': 'title_idx', 'columns': (<UnicodeCol b5e4246cL title>,)}>, <DatabaseIndex b5e42b2cL {'name': 'series_idx', 'columns': (<UnicodeCol b5e42b4cL series>,)}>, <DatabaseIndex b5e42cccL {'name': 'ser_no_idx', 'columns': (<IntCol b5e42b6cL ser_no>,)}>, <DatabaseIndex b5e42d0cL {'name': 'archive_idx', 'columns': (<StringCol b5e42b8cL archive>,)}>, <DatabaseIndex b5e42d4cL {'unique': True, 'name': 'archive_file_idx', 'columns': (<StringCol b5e42b8cL archive>, <UnicodeCol b5e42bacL file>)}>, <DatabaseIndex b5e42d6cL {'name': 'file_idx', 'columns': (<UnicodeCol b5e42bacL file>,)}>, <DatabaseIndex b5e42dacL {'name': 'size_idx', 'columns': (<IntCol b5e42bccL size>,)}>, <DatabaseIndex b5e42decL {'name': 'deleted_idx', 'columns': (<BoolCol b5e42c0cL deleted>,)}>, <DatabaseIndex b5e42e2cL {'name': 'extension_idx', 'columns': (<ForeignKey b5e42c2cL extension>,)}>, <DatabaseIndex b5e42e6cL {'name': 'date_idx', 'columns': (<DateCol b5e42c4cL date>,)}>, <DatabaseIndex b5e42eacL {'name': 'language_idx', 'columns': (<ForeignKey b5e42c6cL 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 m_librarian.db.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 b5e51c8cL count>, 'name': <UnicodeCol b5e51c0cL 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 b5e51cccL {'name': 'count_idx', 'columns': (<IntCol b5e51c8cL count>,)}>]
indexes = [<sqlobject.index.SODatabaseIndex object>]
joinDefinitions = []
joins = []
soClass

alias of m_librarian.db.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 b5dd516cL count>, 'name': <UnicodeCol b5dd50ecL name>, 'title': <UnicodeCol b5dd514cL 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 b5dd510cL {'name': 'title_idx', 'columns': (<UnicodeCol b5dd514cL title>,)}>, <DatabaseIndex b5dd51ccL {'name': 'count_idx', 'columns': (<IntCol b5dd516cL count>,)}>]
indexes = [<sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>]
joinDefinitions = [<sqlobject.joins.RelatedJoin object>]
joins = [<sqlobject.joins.SORelatedJoin object>]
soClass

alias of m_librarian.db.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 b5dd590cL count>, 'name': <UnicodeCol b5dd582cL 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 b5dd592cL {'name': 'count_idx', 'columns': (<IntCol b5dd590cL count>,)}>]
indexes = [<sqlobject.index.SODatabaseIndex object>]
joinDefinitions = []
joins = []
soClass

alias of m_librarian.db.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 b5e4234cL author>, 'bookID': <ForeignKey b5e4238cL 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 b5e4230cL {'name': 'author_idx', 'columns': (<ForeignKey b5e4234cL author>,)}>, <DatabaseIndex b5e4232cL {'name': 'book_idx', 'columns': (<ForeignKey b5e4238cL book>,)}>, <DatabaseIndex b5e423ccL {'unique': True, 'name': 'main_idx', 'columns': (<ForeignKey b5e4234cL author>, <ForeignKey b5e4238cL book>)}>]
indexes = [<sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>]
joinDefinitions = []
joins = []
soClass

alias of m_librarian.db.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 = {'bookID': <ForeignKey b5e516ecL book>, 'genreID': <ForeignKey b5e516acL genre>}
columnList = [<SOForeignKey bookID connected to Book not null>, <SOForeignKey genreID connected to Genre not null>]
columns = {'bookID': <SOForeignKey bookID connected to Book not null>, 'genreID': <SOForeignKey genreID connected to Genre not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b5e5162cL {'name': 'book_idx', 'columns': (<ForeignKey b5e516ecL book>,)}>, <DatabaseIndex b5e5154cL {'name': 'genre_idx', 'columns': (<ForeignKey b5e516acL genre>,)}>, <DatabaseIndex b5e5168cL {'unique': True, 'name': 'main_idx', 'columns': (<ForeignKey b5e516ecL book>, <ForeignKey b5e516acL genre>)}>]
indexes = [<sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>, <sqlobject.index.SODatabaseIndex object>]
joinDefinitions = []
joins = []
soClass

alias of m_librarian.db.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(pbar_cb=None)[source]