Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit88342ae

Browse files
committed
Add oid to list of keys cached.
Add a test to avoid an exception in certain cases.
1 parent6b6f832 commit88342ae

File tree

1 file changed

+4
-3
lines changed
  • src/interfaces/python

1 file changed

+4
-3
lines changed

‎src/interfaces/python/pg.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ def get_attnames(self, cl):
139139
else:
140140
l[attname]='text'
141141

142-
self.__attnames__[cl]=l
142+
l['oid']='int'# every table has this
143+
self.__attnames__[cl]=l# cache it
143144
returnself.__attnames__[cl]
144145

145146
# return a tuple from a database
@@ -194,7 +195,7 @@ def insert(self, cl, a):
194195
l= []
195196
n= []
196197
forfinfnames.keys():
197-
ifa.has_key(f):
198+
iff!='oid'anda.has_key(f):
198199
l.append(_quote(a[f],fnames[f]))
199200
n.append(f)
200201

@@ -228,7 +229,7 @@ def update(self, cl, a):
228229
fnames=self.get_attnames(cl)
229230

230231
forffinfnames.keys():
231-
ifa.has_key(ff):
232+
ifff!='oid'anda.has_key(ff):
232233
v.append("%s = %s"% (ff,_quote(a[ff],fnames[ff])))
233234

234235
ifv== []:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp