postgresql :: NativePGResult :: fname
Returns the field name of a given column_numberpostgresql :: NativePGResult :: fnumber
Returns the column number associated with the column namepostgresql :: NativePGResult :: is_null
Tests wether a field is a null valuepostgresql :: NativePGResult :: nfields
Returns the number of columns in each row of the query resultpostgresql :: NativePGResult :: ntuples
Returns the number of rows in the query resultpostgresql :: NativePGResult :: status
Returns the ExecStatusType of a resultpostgresql :: NativePGResult :: value
Returns a single field value of one row of the result at row_number, column_numberpostgresql $ NativePGResult :: SELF
Type of this instance, automatically specialized in every classcore :: Pointer :: address_is_null
Is the address behind this Object at NULL?core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
core :: Pointer :: defaultinit
postgresql :: NativePGResult :: fname
Returns the field name of a given column_numberpostgresql :: NativePGResult :: fnumber
Returns the column number associated with the column namepostgresql :: NativePGResult :: is_null
Tests wether a field is a null valuecore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
postgresql :: NativePGResult :: nfields
Returns the number of columns in each row of the query resultpostgresql :: NativePGResult :: ntuples
Returns the number of rows in the query resultcore :: Object :: output_class_name
Display class name on stdout (debug only).postgresql :: NativePGResult :: status
Returns the ExecStatusType of a resultpostgresql :: NativePGResult :: value
Returns a single field value of one row of the result at row_number, column_number
extern class NativePGResult `{PGresult *`}
# Frees the memory block associated with the result
fun clear `{PQclear(self); `}
# Returns the number of rows in the query result
fun ntuples:Int `{ return PQntuples(self); `}
# Returns the number of columns in each row of the query result
fun nfields:Int `{return PQnfields(self); `}
# Returns the ExecStatusType of a result
fun status: ExecStatusType `{ return PQresultStatus(self); `}
# Returns the field name of a given column_number
fun fname(column_number:Int):String import CString.to_s `{
return CString_to_s( PQfname(self, column_number));
`}
# Returns the column number associated with the column name
fun fnumber(column_name:String):Int import String.to_cstring `{
return PQfnumber(self, String_to_cstring(column_name));
`}
# Returns a single field value of one row of the result at row_number, column_number
fun value(row_number:Int, column_number:Int):String import CString.to_s `{
return CString_to_s(PQgetvalue(self, row_number, column_number));
`}
# Tests wether a field is a null value
fun is_null(row_number:Int, column_number: Int): Bool `{
return PQgetisnull(self, row_number, column_number);
`}
end
lib/postgresql/native_postgres.nit:52,1--85,3