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 = {'misc_name': <UnicodeCol b5a5ba0c misc_name>, 'name': <UnicodeCol b5a5a9ec name>, 'surname': <UnicodeCol b5a5aa2c surname>, 'count': <IntCol b5a5ba2c count>}
columnList = [<SOUnicodeCol surname not null>, <SOUnicodeCol name not null>, <SOUnicodeCol misc_name not null>, <SOIntCol count not null>]
columns = {'misc_name': <SOUnicodeCol misc_name not null>, 'name': <SOUnicodeCol name not null>, 'surname': <SOUnicodeCol surname not null>, 'count': <SOIntCol count not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b59b54cc {'columns': (<UnicodeCol b5a5aa2c surname>, <UnicodeCol b5a5a9ec name>, <UnicodeCol b5a5ba0c misc_name>), 'name': 'full_name_idx', 'unique': True}>, <DatabaseIndex b59b58ac {'columns': (<IntCol b5a5ba2c count>,), 'name': 'count_idx'}>]
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 = {'date': <DateCol b59bbfec date>, 'archive': <StringCol b59bbcac archive>, 'lib_id': <StringCol b59bbe2c lib_id>, 'series': <UnicodeCol b59bbbac series>, 'size': <IntCol b59bbdac size>, 'extensionID': <ForeignKey b59bbf2c extension>, 'ser_no': <IntCol b59bbc2c ser_no>, 'title': <UnicodeCol b59bbb2c title>, 'languageID': <ForeignKey b59be02c language>, 'file': <StringCol b59bbd2c file>, 'deleted': <BoolCol b59bbeac deleted>}
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 = {'date': <SODateCol date not null>, 'archive': <SOStringCol archive not null>, 'lib_id': <SOStringCol lib_id not null>, 'series': <SOUnicodeCol series not null>, 'size': <SOIntCol size not null>, 'extensionID': <SOForeignKey extensionID connected to Extension not null>, 'ser_no': <SOIntCol ser_no>, 'title': <SOUnicodeCol title not null>, 'languageID': <SOForeignKey languageID connected to Language>, 'file': <SOStringCol file not null>, 'deleted': <SOBoolCol deleted not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b59be0ec {'columns': (<UnicodeCol b59bbb2c title>,), 'name': 'title_idx'}>, <DatabaseIndex b59be10c {'columns': (<UnicodeCol b59bbbac series>,), 'name': 'series_idx'}>, <DatabaseIndex b59be18c {'columns': (<IntCol b59bbc2c ser_no>,), 'name': 'ser_no_idx'}>, <DatabaseIndex b59be20c {'columns': (<StringCol b59bbcac archive>,), 'name': 'archive_idx'}>, <DatabaseIndex b59be2ac {'columns': (<StringCol b59bbcac archive>, <StringCol b59bbd2c file>), 'name': 'archive_file_idx', 'unique': True}>, <DatabaseIndex b59be30c {'columns': (<StringCol b59bbd2c file>,), 'name': 'file_idx'}>, <DatabaseIndex b59be36c {'columns': (<IntCol b59bbdac size>,), 'name': 'size_idx'}>, <DatabaseIndex b59be3ec {'columns': (<BoolCol b59bbeac deleted>,), 'name': 'deleted_idx'}>, <DatabaseIndex b59be46c {'columns': (<ForeignKey b59bbf2c extension>,), 'name': 'extension_idx'}>, <DatabaseIndex b59be4ec {'columns': (<DateCol b59bbfec date>,), 'name': 'date_idx'}>, <DatabaseIndex b59be56c {'columns': (<ForeignKey b59be02c language>,), 'name': 'language_idx'}>]
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 = {'name': <UnicodeCol b59c3aec name>, 'count': <IntCol b59c3d2c count>}
columnList = [<SOUnicodeCol name not null>, <SOIntCol count not null>]
columns = {'name': <SOUnicodeCol name not null>, 'count': <SOIntCol count not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b59c3d8c {'columns': (<IntCol b59c3d2c count>,), 'name': 'count_idx'}>]
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 = {'name': <UnicodeCol b59c754c name>, 'title': <UnicodeCol b59c764c title>, 'count': <IntCol b59c768c count>}
columnList = [<SOUnicodeCol name not null>, <SOUnicodeCol title not null>, <SOIntCol count not null>]
columns = {'name': <SOUnicodeCol name not null>, 'title': <SOUnicodeCol title not null>, 'count': <SOIntCol count not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b59c76cc {'columns': (<UnicodeCol b59c764c title>,), 'name': 'title_idx'}>, <DatabaseIndex b59c772c {'columns': (<IntCol b59c768c count>,), 'name': 'count_idx'}>]
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 = {'name': <UnicodeCol b59c920c name>, 'count': <IntCol b59c924c count>}
columnList = [<SOUnicodeCol name not null>, <SOIntCol count not null>]
columns = {'name': <SOUnicodeCol name not null>, 'count': <SOIntCol count not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b59c926c {'columns': (<IntCol b59c924c count>,), 'name': 'count_idx'}>]
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 = {'bookID': <ForeignKey b59bb20c book>, 'authorID': <ForeignKey b59bb22c author>}
columnList = [<SOForeignKey authorID connected to Author not null>, <SOForeignKey bookID connected to Book not null>]
columns = {'bookID': <SOForeignKey bookID connected to Book not null>, 'authorID': <SOForeignKey authorID connected to Author not null>}
idName = 'id'
indexDefinitions = [<DatabaseIndex b59bb2ec {'columns': (<ForeignKey b59bb22c author>,), 'name': 'author_idx'}>, <DatabaseIndex b59bb30c {'columns': (<ForeignKey b59bb20c book>,), 'name': 'book_idx'}>, <DatabaseIndex b59bb38c {'columns': (<ForeignKey b59bb22c author>, <ForeignKey b59bb20c book>), 'name': 'main_idx', 'unique': True}>]
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 b59c310c genre>, 'bookID': <ForeignKey b59c32ac 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 b59c302c {'columns': (<ForeignKey b59c32ac book>,), 'name': 'book_idx'}>, <DatabaseIndex b59c326c {'columns': (<ForeignKey b59c310c genre>,), 'name': 'genre_idx'}>, <DatabaseIndex b59c320c {'columns': (<ForeignKey b59c32ac book>, <ForeignKey b59c310c genre>), 'name': 'main_idx', 'unique': True}>]
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]