books = RelatedJoin('Book', otherColumn='book_id',
intermediateTable='author_book',
createRelatedTable=False)
+
+ @property
+ def fullname(self):
+ fullnames = filter(None, (self.surname, self.name, self.misc_name))
+ return ' '.join(fullnames)
+
full_name_idx = DatabaseIndex(surname, name, misc_name, unique=True)
count_idx = DatabaseIndex(count)
except:
db_uri = find_sqlite_dburi()
+ if '://' not in db_uri:
+ db_uri = 'sqlite://' + os.path.abspath(db_uri).replace(os.sep, '/')
+
sqlhub.processConnection = connection = connectionForURI(db_uri)
if connection.dbName == 'sqlite':