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 b5b9c48cL count>, 'misc_name': <UnicodeCol b5b4354cL misc_name>, 'name': <UnicodeCol b5bb3fccL name>, 'surname': <UnicodeCol b5b9c3acL 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 b5b6e6ecL {'unique': True, 'name': 'full_name_idx', 'columns': (<UnicodeCol b5b9c3acL surname>, <UnicodeCol b5bb3fccL name>, <UnicodeCol b5b4354cL misc_name>)}>, <DatabaseIndex b5b6e72cL {'name': 'count_idx', 'columns': (<IntCol b5b9c48cL 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>
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 = {'archive': <StringCol b5afb94cL archive>, 'date': <DateCol b5afba0cL date>, 'deleted': <BoolCol b5afb9ccL deleted>, 'extensionID': <ForeignKey b5afb9ecL extension>, 'file': <StringCol b5afb96cL file>, 'languageID': <ForeignKey b5afba2cL language>, 'lib_id': <StringCol b5afb9acL lib_id>, 'ser_no': <IntCol b5afb92cL ser_no>, 'series': <UnicodeCol b5afb90cL series>, 'size': <IntCol b5afb98cL size>, 'title': <UnicodeCol b5afb20cL title>}
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 = {'archive': <SOStringCol archive not null>, 'date': <SODateCol date not null>, 'deleted': <SOBoolCol deleted not null>, 'extensionID': <SOForeignKey extensionID connected to Extension not null>, 'file': <SOStringCol 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 b5afba4cL {'name': 'title_idx', 'columns': (<UnicodeCol b5afb20cL title>,)}>, <DatabaseIndex b5afb8ecL {'name': 'series_idx', 'columns': (<UnicodeCol b5afb90cL series>,)}>, <DatabaseIndex b5afba8cL {'name': 'ser_no_idx', 'columns': (<IntCol b5afb92cL ser_no>,)}>, <DatabaseIndex b5afbaccL {'name': 'archive_idx', 'columns': (<StringCol b5afb94cL archive>,)}>, <DatabaseIndex b5afbb0cL {'unique': True, 'name': 'archive_file_idx', 'columns': (<StringCol b5afb94cL archive>, <StringCol b5afb96cL file>)}>, <DatabaseIndex b5afbb2cL {'name': 'file_idx', 'columns': (<StringCol b5afb96cL file>,)}>, <DatabaseIndex b5afbb6cL {'name': 'size_idx', 'columns': (<IntCol b5afb98cL size>,)}>, <DatabaseIndex b5afbbacL {'name': 'deleted_idx', 'columns': (<BoolCol b5afb9ccL deleted>,)}>, <DatabaseIndex b5afbbecL {'name': 'extension_idx', 'columns': (<ForeignKey b5afb9ecL extension>,)}>, <DatabaseIndex b5afbc2cL {'name': 'date_idx', 'columns': (<DateCol b5afba0cL date>,)}>, <DatabaseIndex b5afbc6cL {'name': 'language_idx', 'columns': (<ForeignKey b5afba2cL 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 b5b0b02cL count>, 'name': <UnicodeCol b5b0b74cL 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 b5b0b76cL {'name': 'count_idx', 'columns': (<IntCol b5b0b02cL 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 b5b0bbecL count>, 'name': <UnicodeCol b5b0b5ccL name>, 'title': <UnicodeCol b5b0bc0cL 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 b5b0baecL {'name': 'title_idx', 'columns': (<UnicodeCol b5b0bc0cL title>,)}>, <DatabaseIndex b5b0bc8cL {'name': 'count_idx', 'columns': (<IntCol b5b0bbecL 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 b5b0f38cL count>, 'name': <UnicodeCol b5b0f2acL 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 b5b0f3acL {'name': 'count_idx', 'columns': (<IntCol b5b0f38cL 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 b5afb12cL author>, 'bookID': <ForeignKey b5afb0ecL 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 b5afb14cL {'name': 'author_idx', 'columns': (<ForeignKey b5afb12cL author>,)}>, <DatabaseIndex b5afb10cL {'name': 'book_idx', 'columns': (<ForeignKey b5afb0ecL book>,)}>, <DatabaseIndex b5afb16cL {'unique': True, 'name': 'main_idx', 'columns': (<ForeignKey b5afb12cL author>, <ForeignKey b5afb0ecL 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 b5b05fccL book>, 'genreID': <ForeignKey b5b05fecL 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 b5b05facL {'name': 'book_idx', 'columns': (<ForeignKey b5b05fccL book>,)}>, <DatabaseIndex b5b05f2cL {'name': 'genre_idx', 'columns': (<ForeignKey b5b05fecL genre>,)}>, <DatabaseIndex b5b0662cL {'unique': True, 'name': 'main_idx', 'columns': (<ForeignKey b5b05fccL book>, <ForeignKey b5b05fecL 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]