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 b66b5fccL count>, 'misc_name': <UnicodeCol b667710cL misc_name>, 'surname': <UnicodeCol b62b3cacL surname>, 'name': <UnicodeCol b667576cL 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 b66b5facL {'unique': True, 'name': 'full_name_idx', 'columns': (<UnicodeCol b62b3cacL surname>, <UnicodeCol b667576cL name>, <UnicodeCol b667710cL misc_name>)}>, <DatabaseIndex b66b5e8cL {'name': 'count_idx', 'columns': (<IntCol b66b5fccL 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'
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 b66ab7ecL extension>, 'title': <UnicodeCol b66af92cL title>, 'deleted': <BoolCol b66abb6cL deleted>, 'series': <UnicodeCol b66af50cL series>, 'languageID': <ForeignKey b66abe8cL language>, 'ser_no': <IntCol b66af9ccL ser_no>, 'file': <StringCol b66ab82cL file>, 'lib_id': <StringCol b66aba6cL lib_id>, 'date': <DateCol b66ab88cL date>, 'archive': <StringCol b66aba4cL archive>, 'size': <IntCol b66abc0cL 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 b66abe0cL {'name': 'title_idx', 'columns': (<UnicodeCol b66af92cL title>,)}>, <DatabaseIndex b66ab84cL {'name': 'series_idx', 'columns': (<UnicodeCol b66af50cL series>,)}>, <DatabaseIndex b66abdacL {'name': 'ser_no_idx', 'columns': (<IntCol b66af9ccL ser_no>,)}>, <DatabaseIndex b66ab18cL {'name': 'archive_idx', 'columns': (<StringCol b66aba4cL archive>,)}>, <DatabaseIndex b66ab52cL {'unique': True, 'name': 'archive_file_idx', 'columns': (<StringCol b66aba4cL archive>, <StringCol b66ab82cL file>)}>, <DatabaseIndex b66ab54cL {'name': 'file_idx', 'columns': (<StringCol b66ab82cL file>,)}>, <DatabaseIndex b66ab4ecL {'name': 'size_idx', 'columns': (<IntCol b66abc0cL size>,)}>, <DatabaseIndex b66ab58cL {'name': 'deleted_idx', 'columns': (<BoolCol b66abb6cL deleted>,)}>, <DatabaseIndex b66ab5ecL {'name': 'extension_idx', 'columns': (<ForeignKey b66ab7ecL extension>,)}>, <DatabaseIndex b66ab64cL {'name': 'date_idx', 'columns': (<DateCol b66ab88cL date>,)}>, <DatabaseIndex b66ab68cL {'name': 'language_idx', 'columns': (<ForeignKey b66abe8cL 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'
Book.title
Book.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 b625538cL count>, 'name': <UnicodeCol b6255e8cL 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 b625546cL {'name': 'count_idx', 'columns': (<IntCol b625538cL 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 b624506cL count>, 'name': <UnicodeCol b6255f4cL name>, 'title': <UnicodeCol b6255f0cL 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 b624562cL {'name': 'title_idx', 'columns': (<UnicodeCol b6255f0cL title>,)}>, <DatabaseIndex b624576cL {'name': 'count_idx', 'columns': (<IntCol b624506cL 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'
Genre.title
Genre.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 b624522cL count>, 'name': <UnicodeCol b6245c8cL 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 b624544cL {'name': 'count_idx', 'columns': (<IntCol b624522cL 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 b66b0d6cL author>, 'bookID': <ForeignKey b66b0decL 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 b66b0dccL {'name': 'author_idx', 'columns': (<ForeignKey b66b0d6cL author>,)}>, <DatabaseIndex b66b08ccL {'name': 'book_idx', 'columns': (<ForeignKey b66b0decL book>,)}>, <DatabaseIndex b66b09ecL {'unique': True, 'name': 'main_idx', 'columns': (<ForeignKey b66b0d6cL author>, <ForeignKey b66b0decL 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 b669b7ccL genre>, 'bookID': <ForeignKey b669bbacL 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 b669b08cL {'name': 'book_idx', 'columns': (<ForeignKey b669bbacL book>,)}>, <DatabaseIndex b669b16cL {'name': 'genre_idx', 'columns': (<ForeignKey b669b7ccL genre>,)}>, <DatabaseIndex b669beccL {'unique': True, 'name': 'main_idx', 'columns': (<ForeignKey b669bbacL book>, <ForeignKey b669b7ccL 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]