Skip to content

Commit

Permalink
Release 1.2.8 -> PyPi.
Browse files Browse the repository at this point in the history
  • Loading branch information
Randall Nagy committed May 27, 2024
1 parent 2f6017c commit 2b4794a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion PyDAO_9000.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: PyDAO_9000
Version: 1.2.7
Version: 1.2.8
Summary: 'All-In-One File' SQL Code Generator
Author-email: Randall Nagy <[email protected]>
Project-URL: Homepage, https://github.com/soft9000/PyDAO
Expand Down
2 changes: 1 addition & 1 deletion SqltDAO/CodeGen01/Meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class Meta:
PRODUCT = "PyDAO 9000"
VERSION = '1.2.7'
VERSION = '1.2.8'

@staticmethod
def Title():
Expand Down
14 changes: 4 additions & 10 deletions SqltDAO/CodeGen01/SqlSyntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def code_class_template(self, text_file):
result += self.level.print("if self.bOpen is False:")
self.level.inc()
result += self.level.print("self.conn = sqlite3.connect(self.db)")
result += self.level.print("self.conn.row_factory = sqlite3.Row")
result += self.level.print("self.curs = self.conn.cursor()")
result += self.level.print("self.curs.row_factory = sqlite3.Row")
result += self.level.print("self.bOpen = True")
self.level.dec()
result += self.level.print("return True")
Expand Down Expand Up @@ -209,25 +209,19 @@ def code_class_template(self, text_file):
self.level.pop()

self.level.push()
result += self.level.print("''' New: Explicitly convert the SQLRow to our fields. '''")
result += self.level.print("''' Caveat: Full field selection is assumed, in natural order. '''")
result += self.level.print("''' New: Using the row_factory for |dictionary| support. '''")
result += self.level.print("def select_dict(self, sql_select)->dict:")
self.level.inc()
result += self.level.print("if self.bOpen:")
self.level.inc()
result += self.level.print("self.curs.row_factory = sqlite3.Row")
result += self.level.print('self.curs.execute(sql_select)')
result += self.level.print("zlist = self.curs.fetchall()")
result += self.level.print("for ref in zlist:")
self.level.inc()
result += self.level.print("try:")
self.level.inc()
result += self.level.print("result = OrderedDict(self.fields)")
result += self.level.print("for ss, tag in enumerate(result,1):")
self.level.inc()
result += self.level.print("result[tag] = ref[ss]")
self.level.dec()
result += self.level.print("result['ID'] = ref[0]")
result += self.level.print("yield result")
result += self.level.print("yield OrderedDict(ref)")
self.level.dec()
result += self.level.print("except:")
self.level.inc()
Expand Down
Binary file added dist/PyDAO_9000-1.2.8-py3-none-any.whl
Binary file not shown.
Binary file added dist/pydao_9000-1.2.8.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "PyDAO_9000"
version = "1.2.7"
version = "1.2.8"
authors = [
{ name="Randall Nagy", email="[email protected]" },
]
Expand Down

0 comments on commit 2b4794a

Please sign in to comment.