2010-11-21 21:17 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* contrib/hbsqlit3/hdbcsqlt.prg
  * contrib/hbpgsql/hdbcpg.prg
    % Minor optimizations.
    ! Fixed RTEs by EXPORTing two object variables:
          TSQLTStatement:pRes (used from HDBC code)
          TSQLTResultSet:nRows
      I'm not sure this is right solution, f.e. one of them
      is used internally by HBODBC code.
This commit is contained in:
Viktor Szakats
2010-11-21 20:18:17 +00:00
parent 46298a0dd6
commit b901bd2241
3 changed files with 23 additions and 9 deletions

View File

@@ -16,6 +16,16 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-11-21 21:17 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbsqlit3/hdbcsqlt.prg
* contrib/hbpgsql/hdbcpg.prg
% Minor optimizations.
! Fixed RTEs by EXPORTing two object variables:
TSQLTStatement:pRes (used from HDBC code)
TSQLTResultSet:nRows
I'm not sure this is right solution, f.e. one of them
is used internally by HBODBC code.
2010-11-21 20:42 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbpgsql/postgres.c
+ Added PQPREPARE(), PQEXECPREPARED(). Based on code donated by
@@ -50,7 +60,7 @@
PQPREPARE()
PQEXECPREPARED()
; TOFIX: Internal are accessing obj vars directly:
; TOFIX: Internal are accessing obj vars directly: [DONE - by simply exporting it, not necessarily good solution]
Error BASE/42 Scope violation (protected): TSQLTSTATEMENT:PRES
Called from TSQLTSTATEMENT:PRES(0)
Called from TSQLTRESULTSET:NEW(0)

View File

@@ -156,11 +156,12 @@ create class TPGStatement
var pDB
var cSql
var pRes
var oRs
EXPORTED:
var pRes
method new( pDB, cSql )
method executeQuery( cSql )
method executeUpdate( cSql )
@@ -344,7 +345,6 @@ create class TPGResultSet
var lAfterLast INIT .F.
var nRow INIT 0
var nRows INIT 0
var cTableName
var aPrimaryKeys
@@ -354,6 +354,8 @@ create class TPGResultSet
EXPORTED:
var nRows INIT 0
method new( pDB, pStmt )
method Close()
@@ -376,7 +378,7 @@ create class TPGResultSet
method getString( nField )
method getNumber( nField ) INLINE val( ::getString( nField ) )
method getDate( nField ) INLINE StoD( strtran( ::getString( nField ), "-", "" ) )
method getDate( nField ) INLINE StoD( strtran( ::getString( nField ), "-" ) )
method getBoolean( nField ) INLINE ( ::getString( nField ) == "t" )
method getMetaData()
@@ -392,7 +394,7 @@ create class TPGResultSet
method updateBuffer( nField, xValue, cType )
method updateString( nField, cValue ) INLINE ::updateBuffer( nField, cValue, "C" )
method updateNumber( nField, nValue ) INLINE ::updateBuffer( nField, alltrim( str( nValue ) ), "N" )
method updateNumber( nField, nValue ) INLINE ::updateBuffer( nField, hb_ntos( nValue ), "N" )
method updateDate( nField, dValue ) INLINE ::updateBuffer( nField, dtos( dValue ), "D" )
method updateBoolean( nField, lValue ) INLINE ::updateBuffer( nField, iif( lValue, "t", "f" ), "L" )

View File

@@ -144,11 +144,12 @@ create class TSQLTStatement
var pDB
var cSql
var pRes
var oRs
EXPORTED:
var pRes
method new( pDB, cSql )
method executeQuery( cSql )
method executeUpdate( cSql )
@@ -296,7 +297,6 @@ create class TSQLTResultSet
var lAfterLast INIT .F.
var nRow INIT 0
var nRows INIT 0
var cTableName
var aPrimaryKeys
@@ -307,6 +307,8 @@ create class TSQLTResultSet
EXPORTED:
var nRows INIT 0
method new( pDB, pStmt )
method Close()
@@ -329,7 +331,7 @@ create class TSQLTResultSet
method getString( nField )
method getNumber( nField ) INLINE val( ::getString( nField ) )
method getDate( nField ) INLINE StoD( strtran( ::getString( nField ), "-", "" ) )
method getDate( nField ) INLINE StoD( strtran( ::getString( nField ), "-" ) )
method getBoolean( nField ) INLINE ( ::getString( nField ) == "t" )
method getMetaData()
@@ -345,7 +347,7 @@ create class TSQLTResultSet
method updateBuffer( nField, xValue, cType )
method updateString( nField, cValue ) INLINE ::updateBuffer( nField, cValue, "C" )
method updateNumber( nField, nValue ) INLINE ::updateBuffer( nField, alltrim( str( nValue ) ), "N" )
method updateNumber( nField, nValue ) INLINE ::updateBuffer( nField, hb_ntos( nValue ), "N" )
method updateDate( nField, dValue ) INLINE ::updateBuffer( nField, dtos( dValue ), "D" )
method updateBoolean( nField, lValue ) INLINE ::updateBuffer( nField, iif( lValue, "t", "f" ), "L" )