postgresql :: PGResult :: clear
Clears the result object and frees the memory allocated to the underlying C structpostgresql :: PGResult :: defaultinit
postgresql :: PGResult :: nfields
Returns the number of columns in each row of the query resultpostgresql $ PGResult :: SELF
Type of this instance, automatically specialized in every classcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
postgresql :: PGResult :: clear
Clears the result object and frees the memory allocated to the underlying C structcore :: Object :: defaultinit
postgresql :: PGResult :: defaultinit
core :: 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 :: PGResult :: nfields
Returns the number of columns in each row of the query resultcore :: Object :: output_class_name
Display class name on stdout (debug only).
# The result of a given query
class PGResult
private var pg_result: NativePGResult
# Clears the result object and frees the memory allocated to the underlying C struct
fun clear do pg_result.clear
# Returns the number of rows in the query result
fun ntuples:Int do return pg_result.ntuples
# Returns the number of columns in each row of the query result
fun nfields:Int do return pg_result.nfields
# Returns the ExecStatusType of a result
fun is_ok:Bool do return pg_result.status.is_ok
# Returns the field name of a given `column_number`
fun fname(column_number:Int):String do return pg_result.fname(column_number)
# Returns the column number associated with the `column_name`
fun fnumber(column_name:String):Int do return pg_result.fnumber(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 do return pg_result.value(row_number, column_number)
# Tests wether a field specified by the `row_number` and `column_number` is null.
fun is_null(row_number:Int, column_number: Int): Bool do return pg_result.is_null(row_number, column_number)
end
lib/postgresql/postgres.nit:134,1--161,3