Client related classes

Client related classes

Functions

Properties

gpointer client Write / Construct Only
GAFlightClient * flight-client Read / Write / Construct Only
GAFlightSQLClient * client Read / Write / Construct Only
gpointer statement Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ├── GAFlightSQLClient
    ╰── GAFlightSQLPreparedStatement

Includes

#include <arrow-flight-sql-glib/arrow-flight-sql-glib.h>

Description

GAFlightSQLClient is a class for Apache Arrow Flight SQL client.

GAFlightSQLPreparedStatement is a class for prepared statement.

Functions

gaflightsql_prepared_statement_execute ()

GAFlightInfo *
gaflightsql_prepared_statement_execute
                               (GAFlightSQLPreparedStatement *statement,
                                GAFlightCallOptions *options,
                                GError **error);

Parameters

statement

A GAFlightSQLPreparedStatement.

 

options

A GAFlightCallOptions.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

The GAFlightInfo describing where to access the dataset on success, NULL on error.

[nullable][transfer full]

Since: 14.0.0

gaflightsql_prepared_statement_execute_update ()

gint64
gaflightsql_prepared_statement_execute_update
                               (GAFlightSQLPreparedStatement *statement,
                                GAFlightCallOptions *options,
                                GError **error);

Parameters

statement

A GAFlightSQLPreparedStatement.

 

options

A GAFlightCallOptions.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

The number of changed records.

Since: 14.0.0

gaflightsql_prepared_statement_get_parameter_schema ()

GArrowSchema *
gaflightsql_prepared_statement_get_parameter_schema
                               (GAFlightSQLPreparedStatement *statement);

Parameters

Returns

The GArrowSchema for parameter.

[nullable][transfer full]

Since: 14.0.0

gaflightsql_prepared_statement_get_dataset_schema ()

GArrowSchema *
gaflightsql_prepared_statement_get_dataset_schema
                               (GAFlightSQLPreparedStatement *statement);

Parameters

Returns

The GArrowSchema for dataset.

[nullable][transfer full]

Since: 14.0.0

gaflightsql_prepared_statement_set_record_batch ()

gboolean
gaflightsql_prepared_statement_set_record_batch
                               (GAFlightSQLPreparedStatement *statement,
                                GArrowRecordBatch *record_batch,
                                GError **error);

Parameters

statement

A GAFlightSQLPreparedStatement.

 

record_batch

A GArrowRecordBatch that contains the parameters that will be bound.

 

error

Return location for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE otherwise.

Since: 14.0.0

gaflightsql_prepared_statement_set_record_batch_reader ()

gboolean
gaflightsql_prepared_statement_set_record_batch_reader
                               (GAFlightSQLPreparedStatement *statement,
                                GArrowRecordBatchReader *reader,
                                GError **error);

Parameters

statement

A GAFlightSQLPreparedStatement.

 

reader

A GArrowRecordBatchReader that contains the parameters that will be bound.

 

error

Return location for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE otherwise.

Since: 14.0.0

gaflightsql_prepared_statement_close ()

gboolean
gaflightsql_prepared_statement_close (GAFlightSQLPreparedStatement *statement,
                                      GAFlightCallOptions *options,
                                      GError **error);

Parameters

statement

A GAFlightSQLPreparedStatement.

 

options

A GAFlightCallOptions.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE otherwise.

After this, the prepared statement may not be used anymore.

Since: 14.0.0

gaflightsql_prepared_statement_is_closed ()

gboolean
gaflightsql_prepared_statement_is_closed
                               (GAFlightSQLPreparedStatement *statement);

Parameters

Returns

Whether the prepared statement is closed or not.

Since: 14.0.0

gaflightsql_client_new ()

GAFlightSQLClient *
gaflightsql_client_new (GAFlightClient *client);

Parameters

client

A GAFlightClient to be used.

 

Returns

: The newly created Flight SQL client.

Since: 9.0.0

gaflightsql_client_execute ()

GAFlightInfo *
gaflightsql_client_execute (GAFlightSQLClient *client,
                            const gchar *query,
                            GAFlightCallOptions *options,
                            GError **error);

Parameters

client

A GAFlightSQLClient.

 

query

A query to be executed in the UTF-8 format.

 

options

A GAFlightCallOptions.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

The GAFlightInfo describing where to access the dataset on success, NULL on error.

[nullable][transfer full]

Since: 9.0.0

gaflightsql_client_execute_update ()

gint64
gaflightsql_client_execute_update (GAFlightSQLClient *client,
                                   const gchar *query,
                                   GAFlightCallOptions *options,
                                   GError **error);

Parameters

client

A GAFlightSQLClient.

 

query

A query to be executed in the UTF-8 format.

 

options

A GAFlightCallOptions.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

The number of changed records.

Since: 13.0.0

gaflightsql_client_do_get ()

GAFlightStreamReader *
gaflightsql_client_do_get (GAFlightSQLClient *client,
                           GAFlightTicket *ticket,
                           GAFlightCallOptions *options,
                           GError **error);

Parameters

client

A GAFlightClient.

 

ticket

A GAFlightTicket.

 

options

A GAFlightCallOptions.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

The GAFlightStreamReader to read record batched from the server on success, NULL on error.

[nullable][transfer full]

Since: 9.0.0

gaflightsql_client_prepare ()

GAFlightSQLPreparedStatement *
gaflightsql_client_prepare (GAFlightSQLClient *client,
                            const gchar *query,
                            GAFlightCallOptions *options,
                            GError **error);

Parameters

client

A GAFlightSQLClient.

 

query

A query to be prepared in the UTF-8 format.

 

options

A GAFlightCallOptions.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

The GAFlightSQLPreparedStatement on success, NULL on error.

[nullable][transfer full]

Since: 14.0.0

Types and Values

GAFLIGHTSQL_TYPE_PREPARED_STATEMENT

#define             GAFLIGHTSQL_TYPE_PREPARED_STATEMENT

struct GAFlightSQLPreparedStatementClass

struct GAFlightSQLPreparedStatementClass {
  GObjectClass parent_class;
};

GAFLIGHTSQL_TYPE_CLIENT

#define GAFLIGHTSQL_TYPE_CLIENT (gaflightsql_client_get_type())

struct GAFlightSQLClientClass

struct GAFlightSQLClientClass {
  GObjectClass parent_class;
};

GAFlightSQLClient

typedef struct _GAFlightSQLClient GAFlightSQLClient;

GAFlightSQLPreparedStatement

typedef struct _GAFlightSQLPreparedStatement GAFlightSQLPreparedStatement;

Property Details

The “client” property

  “client”                   gpointer

The raw arrow::flight::sql::FlightSqlClient *.

Owner: GAFlightSQLClient

Flags: Write / Construct Only

The “flight-client” property

  “flight-client”            GAFlightClient *

The underlying Flight client.

Owner: GAFlightSQLClient

Flags: Read / Write / Construct Only

Since: 9.0.0

The “client” property

  “client”                   GAFlightSQLClient *

The underlying Flight SQL client.

Owner: GAFlightSQLPreparedStatement

Flags: Read / Write / Construct Only

Since: 14.0.0

The “statement” property

  “statement”                gpointer

Owner: GAFlightSQLPreparedStatement

Flags: Write / Construct Only