Skip to content

Commit

Permalink
Implement prototype for BINARY type.
Browse files Browse the repository at this point in the history
  • Loading branch information
ooke committed Nov 9, 2023
1 parent 06cbbea commit 6572a6f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions exaudfclient/base/exaudflib/exascript.i
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class SWIGTableIterator {
inline unsigned long rowsCompleted();
inline double getDouble(unsigned int col);
inline const char *getString(unsigned int col);
inline const char *getBinary(unsigned int col);
inline int getInt32(unsigned int col);
inline long long getInt64(unsigned int col);
inline const char *getNumeric(unsigned int col);
Expand Down
4 changes: 3 additions & 1 deletion exaudfclient/base/exaudflib/swig/swig_table_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class AbstractSWIGTableIterator {
virtual unsigned long rowsInGroup()=0;
virtual double getDouble(unsigned int col)=0;
virtual const char *getString(unsigned int col, size_t *length = NULL)=0;
virtual const char *getBinary(unsigned int col, size_t *length = NULL)=0;
virtual int32_t getInt32(unsigned int col)=0;
virtual int64_t getInt64(unsigned int col)=0;
virtual const char *getNumeric(unsigned int col)=0;
Expand Down Expand Up @@ -62,6 +63,7 @@ class SWIGTableIterator { //: public AbstractSWIGTableIterator {
virtual unsigned long rowsInGroup() { return impl->rowsInGroup();}
virtual double getDouble(unsigned int col) { return impl->getDouble(col);}
virtual const char *getString(unsigned int col, size_t *length = NULL) {return impl->getString(col, length);}
virtual const char *getBinary(unsigned int col, size_t *length = NULL) {return impl->getBinary(col, length);}
virtual int32_t getInt32(unsigned int col) {return impl->getInt32(col);}
virtual int64_t getInt64(unsigned int col) {return impl->getInt64(col);}
virtual const char *getNumeric(unsigned int col) {return impl->getNumeric(col);}
Expand All @@ -75,4 +77,4 @@ class SWIGTableIterator { //: public AbstractSWIGTableIterator {

} //namespace SWIGVMContainers

#endif //SWIG_TABLE_ITERATOR_H
#endif //SWIG_TABLE_ITERATOR_H
2 changes: 1 addition & 1 deletion exaudfclient/base/python/exascript_python_wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def convert_timestamp(x):
data[colname] = rd(inp.getDouble, inp.wasNull, col)
elif self.__incoltypes[col] == STRING:
data[colname] = rd(inp.getString, inp.wasNull, col, lambda x: decodeUTF8(x))
elif self.__incoltypes[col] == HASHTYPE:
elif self.__incoltypes[col] == BINARY:
data[colname] = rd(inp.getBinary, inp.wasNull, col)
elif self.__incoltypes[col] == INT32:
data[colname] = rd(inp.getInt32, inp.wasNull, col)
Expand Down

0 comments on commit 6572a6f

Please sign in to comment.