minor cleanup
parent
092acdecc4
commit
13106c2227
|
@ -1,17 +1,14 @@
|
||||||
! Copyright (C) 2007 Doug Coleman.
|
! Copyright (C) 2007, 2008 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
! tested on debian linux with postgresql 8.1
|
! tested on debian linux with postgresql 8.1
|
||||||
|
|
||||||
USING: alien alien.syntax combinators system ;
|
USING: alien alien.syntax combinators system ;
|
||||||
IN: db.postgresql.ffi
|
IN: db.postgresql.ffi
|
||||||
|
|
||||||
<<
|
<< "postgresql" {
|
||||||
"postgresql" {
|
|
||||||
{ [ win32? ] [ "libpq.dll" ] }
|
{ [ win32? ] [ "libpq.dll" ] }
|
||||||
{ [ macosx? ] [ "/opt/local/lib/postgresql81/libpq.dylib" ] }
|
{ [ macosx? ] [ "/opt/local/lib/postgresql81/libpq.dylib" ] }
|
||||||
{ [ unix? ] [ "libpq.so" ] }
|
{ [ unix? ] [ "libpq.so" ] }
|
||||||
} cond "cdecl" add-library
|
} cond "cdecl" add-library >>
|
||||||
>>
|
|
||||||
|
|
||||||
! ConnSatusType
|
! ConnSatusType
|
||||||
: CONNECTION_OK HEX: 0 ; inline
|
: CONNECTION_OK HEX: 0 ; inline
|
||||||
|
@ -75,7 +72,6 @@ TYPEDEF: void* SSL*
|
||||||
|
|
||||||
LIBRARY: postgresql
|
LIBRARY: postgresql
|
||||||
|
|
||||||
|
|
||||||
! Exported functions of libpq
|
! Exported functions of libpq
|
||||||
|
|
||||||
! make a new client connection to the backend
|
! make a new client connection to the backend
|
||||||
|
@ -102,10 +98,6 @@ FUNCTION: PQconninfoOption* PQconndefaults ( ) ;
|
||||||
! free the data structure returned by PQconndefaults()
|
! free the data structure returned by PQconndefaults()
|
||||||
FUNCTION: void PQconninfoFree ( PQconninfoOption* connOptions ) ;
|
FUNCTION: void PQconninfoFree ( PQconninfoOption* connOptions ) ;
|
||||||
|
|
||||||
!
|
|
||||||
! close the current connection and restablish a new one with the same
|
|
||||||
! parameters
|
|
||||||
!
|
|
||||||
! Asynchronous (non-blocking)
|
! Asynchronous (non-blocking)
|
||||||
FUNCTION: int PQresetStart ( PGconn* conn ) ;
|
FUNCTION: int PQresetStart ( PGconn* conn ) ;
|
||||||
FUNCTION: PostgresPollingStatusType PQresetPoll ( PGconn* conn ) ;
|
FUNCTION: PostgresPollingStatusType PQresetPoll ( PGconn* conn ) ;
|
||||||
|
|
|
@ -39,8 +39,8 @@ M: postgresql-db dispose ( db -- )
|
||||||
M: postgresql-statement bind-statement* ( seq statement -- )
|
M: postgresql-statement bind-statement* ( seq statement -- )
|
||||||
set-statement-params ;
|
set-statement-params ;
|
||||||
|
|
||||||
M: postgresql-statement rebind-statement ( seq statement -- )
|
M: postgresql-statement reset-statement ( statement -- )
|
||||||
bind-statement* ;
|
drop ;
|
||||||
|
|
||||||
M: postgresql-result-set #rows ( result-set -- n )
|
M: postgresql-result-set #rows ( result-set -- n )
|
||||||
result-set-handle PQntuples ;
|
result-set-handle PQntuples ;
|
||||||
|
|
Loading…
Reference in New Issue