Method

PgsqlResultget_field_number

Declaration

int
pgsql_result_get_field_number (
  PgsqlResult* self,
  const char* field_name
)

Description

Gets the index of a field by name.

Parameters

field_name

Type: const char*

The field name.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.

Return value

Type: int

The field index, or -1 if not found.