forked from openlp/openlp
Fix for OSIS loading
bzr-revno: 116
This commit is contained in:
parent
4afceb8377
commit
8dde1378e3
@ -67,7 +67,7 @@ Index('idx_abbrev', book_table.c.abbrev, book_table.c.id)
|
|||||||
#Column('book_id', None, ForeignKey('book.id')),
|
#Column('book_id', None, ForeignKey('book.id')),
|
||||||
verse_table = Table('verse', metadata,
|
verse_table = Table('verse', metadata,
|
||||||
Column('id', Integer, primary_key=True),
|
Column('id', Integer, primary_key=True),
|
||||||
Column('book_id' ),
|
Column('book_id', Integer ),
|
||||||
Column('chapter', Integer),
|
Column('chapter', Integer),
|
||||||
Column('verse', Integer),
|
Column('verse', Integer),
|
||||||
Column('text', Text),
|
Column('text', Text),
|
||||||
@ -171,13 +171,13 @@ class BibleDBImpl(BibleCommon):
|
|||||||
session.add(versemeta)
|
session.add(versemeta)
|
||||||
session.commit()
|
session.commit()
|
||||||
|
|
||||||
# def createBook(self, bookid, bookname, bookabbrev):
|
def createBook(self, bookid, bookname, bookabbrev):
|
||||||
# log.debug( "createBook %s,%s,%s", bookid, bookname, bookabbrev)
|
log.debug( "createBook %s,%s,%s", bookid, bookname, bookabbrev)
|
||||||
# metadata.bind.echo = False
|
metadata.bind.echo = False
|
||||||
# session = self.Session()
|
session = self.Session()
|
||||||
# bookmeta = Book(int(5), bookname, bookabbrev)
|
bookmeta = Book(int(5), bookname, bookabbrev)
|
||||||
# session.add(bookmeta)
|
session.add(bookmeta)
|
||||||
# session.commit()
|
session.commit()
|
||||||
|
|
||||||
def saveMeta(self, key, value):
|
def saveMeta(self, key, value):
|
||||||
metadata.bind.echo = False
|
metadata.bind.echo = False
|
||||||
@ -195,17 +195,18 @@ class BibleDBImpl(BibleCommon):
|
|||||||
s = text (""" delete FROM meta where key == :k """)
|
s = text (""" delete FROM meta where key == :k """)
|
||||||
self.db.execute(s, k=key)
|
self.db.execute(s, k=key)
|
||||||
|
|
||||||
# def _loadTestaments(self):
|
def _loadTestaments(self):
|
||||||
# log.debug("loadTestaments")
|
log.debug("loadTestaments")
|
||||||
# metadata.bind.echo = False
|
metadata.bind.echo = False
|
||||||
# session = self.Session()
|
session = self.Session()
|
||||||
# testmeta = ONTestament(name="Old Testament")
|
testmeta = ONTestament(name="Old Testament")
|
||||||
# session.add(testmeta)
|
session.add(testmeta)
|
||||||
# testmeta = ONTestament(name="New Testament")
|
testmeta = ONTestament(name="New Testament")
|
||||||
# session.add(testmeta)
|
session.add(testmeta)
|
||||||
# testmeta = ONTestament(name="Apocrypha")
|
testmeta = ONTestament(name="Apocrypha")
|
||||||
# session.add(testmeta)
|
session.add(testmeta)
|
||||||
# session.commit()
|
session.commit()
|
||||||
|
|
||||||
def getBibleBooks(self):
|
def getBibleBooks(self):
|
||||||
log.debug( "getBibleBook ")
|
log.debug( "getBibleBook ")
|
||||||
metadata.bind.echo = False
|
metadata.bind.echo = False
|
||||||
|
Loading…
Reference in New Issue
Block a user