Skip to content

Commit

Permalink
Caveat select_dict.
Browse files Browse the repository at this point in the history
  • Loading branch information
Randall Nagy committed May 27, 2024
1 parent e26dba2 commit 2f6017c
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 4 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.6
Version: 1.2.7
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.6'
VERSION = '1.2.7'

@staticmethod
def Title():
Expand Down
4 changes: 3 additions & 1 deletion SqltDAO/CodeGen01/SqlSyntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def code_class_template(self, text_file):

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("def select_dict(self, sql_select)->dict:")
self.level.inc()
result += self.level.print("if self.bOpen:")
Expand All @@ -221,10 +222,11 @@ def code_class_template(self, text_file):
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):")
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")
self.level.dec()
result += self.level.print("except:")
Expand Down
Binary file not shown.
Binary file removed dist/pydao_9000-1.2.6.tar.gz
Binary file not shown.
Binary file added dist/pydao_9000-1.2.7.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.6"
version = "1.2.7"
authors = [
{ name="Randall Nagy", email="[email protected]" },
]
Expand Down

0 comments on commit 2f6017c

Please sign in to comment.