Server related classes

Server related classes

Functions

Properties

gpointer request Write / Construct Only
gpointer command Write / Construct Only
gpointer request Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ├── GAFlightServer
       ╰── GAFlightSQLServer
    ├── GAFlightSQLClosePreparedStatementRequest
    ├── GAFlightSQLCommand
       ├── GAFlightSQLPreparedStatementUpdate
       ├── GAFlightSQLStatementQuery
       ├── GAFlightSQLStatementQueryTicket
       ╰── GAFlightSQLStatementUpdate
    ├── GAFlightSQLCreatePreparedStatementRequest
    ╰── GAFlightSQLCreatePreparedStatementResult

Implemented Interfaces

GAFlightSQLServer implements GAFlightServable.

Includes

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

Description

GAFlightSQLPreparedStatementUpdate is a class for a request that executes an update SQL prepared statement.

GAFlightSQLCreatePreparedStatementRequest is a class for a request that creates a SQL prepared statement.

GAFlightSQLCreatePreparedStatementResult is a class for a result of the request that creates a SQL prepared statement.

GAFlightSQLClosePreparedStatementRequest is a class for a request that closes a SQL prepared statement.

GAFlightSQLServer is a class to develop an Apache Arrow Flight SQL server.

Functions

gaflightsql_statement_query_get_query ()

const gchar *
gaflightsql_statement_query_get_query (GAFlightSQLStatementQuery *command);

Parameters

Returns

The query to be executed.

Since: 9.0.0

gaflightsql_statement_update_get_query ()

const gchar *
gaflightsql_statement_update_get_query
                               (GAFlightSQLStatementUpdate *command);

Parameters

Returns

The query to be executed.

Since: 13.0.0

gaflightsql_prepared_statement_update_get_handle ()

GBytes *
gaflightsql_prepared_statement_update_get_handle
                               (GAFlightSQLPreparedStatementUpdate *command);

Parameters

Returns

The server-generated opaque identifier for the statement.

[transfer full]

Since: 14.0.0

gaflightsql_statement_query_ticket_generate_handle ()

GBytes *
gaflightsql_statement_query_ticket_generate_handle
                               (const gchar *query,
                                GError **error);

Parameters

query

A query to be executed.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A handle for the given query as GBytes, NULL on error.

[nullable][transfer full]

Since: 9.0.0

gaflightsql_statement_query_ticket_get_handle ()

GBytes *
gaflightsql_statement_query_ticket_get_handle
                               (GAFlightSQLStatementQueryTicket *command);

Parameters

Returns

The handle to identify the query to be executed.

[transfer full]

Since: 9.0.0

gaflightsql_create_prepared_statement_request_get_query ()

const gchar *
gaflightsql_create_prepared_statement_request_get_query
                               (GAFlightSQLCreatePreparedStatementRequest *request);

Returns

The SQL query to be prepared.

Since: 14.0.0

gaflightsql_create_prepared_statement_request_get_transaction_id ()

const gchar *
gaflightsql_create_prepared_statement_request_get_transaction_id
                               (GAFlightSQLCreatePreparedStatementRequest *request);

Returns

The transaction ID, if specified (else a blank string).

Since: 14.0.0

gaflightsql_create_prepared_statement_result_new ()

GAFlightSQLCreatePreparedStatementResult *
gaflightsql_create_prepared_statement_result_new
                               (void);

Returns

: The newly created GAFlightSQLCreatePreparedStatementResult.

Since: 14.0.0

gaflightsql_create_prepared_statement_result_set_dataset_schema ()

void
gaflightsql_create_prepared_statement_result_set_dataset_schema
                               (GAFlightSQLCreatePreparedStatementResult *result,
                                GArrowSchema *schema);

Parameters

result

A GAFlightSQLCreatePreparedStatementResult.

 

schema

A GArrowSchema of dataset.

 

Since: 14.0.0

gaflightsql_create_prepared_statement_result_get_dataset_schema ()

GArrowSchema *
gaflightsql_create_prepared_statement_result_get_dataset_schema
                               (GAFlightSQLCreatePreparedStatementResult *result);

Returns

The current dataset schema.

[nullable][transfer full]

Since: 14.0.0

gaflightsql_create_prepared_statement_result_set_parameter_schema ()

void
gaflightsql_create_prepared_statement_result_set_parameter_schema
                               (GAFlightSQLCreatePreparedStatementResult *result,
                                GArrowSchema *schema);

Parameters

result

A GAFlightSQLCreatePreparedStatementResult.

 

schema

A GArrowSchema of parameter.

 

Since: 14.0.0

gaflightsql_create_prepared_statement_result_get_parameter_schema ()

GArrowSchema *
gaflightsql_create_prepared_statement_result_get_parameter_schema
                               (GAFlightSQLCreatePreparedStatementResult *result);

Returns

The current parameter schema.

[nullable][transfer full]

Since: 14.0.0

gaflightsql_create_prepared_statement_result_set_handle ()

void
gaflightsql_create_prepared_statement_result_set_handle
                               (GAFlightSQLCreatePreparedStatementResult *result,
                                GBytes *handle);

Parameters

result

A GAFlightSQLCreatePreparedStatementResult.

 

handle

A GBytes for server-generated opaque identifier.

 

Since: 14.0.0

gaflightsql_create_prepared_statement_result_get_handle ()

GBytes *
gaflightsql_create_prepared_statement_result_get_handle
                               (GAFlightSQLCreatePreparedStatementResult *result);

Returns

The current server-generated opaque identifier.

[transfer full]

Since: 14.0.0

gaflightsql_close_prepared_statement_request_get_handle ()

GBytes *
gaflightsql_close_prepared_statement_request_get_handle
                               (GAFlightSQLClosePreparedStatementRequest *request);

Parameters

Returns

The server-generated opaque identifier for the statement.

[transfer full]

Since: 14.0.0

gaflightsql_server_get_flight_info_statement ()

GAFlightInfo *
gaflightsql_server_get_flight_info_statement
                               (GAFlightSQLServer *server,
                                GAFlightServerCallContext *context,
                                GAFlightSQLStatementQuery *command,
                                GAFlightDescriptor *descriptor,
                                GError **error);

Parameters

server

A GAFlightSQLServer.

 

context

A GAFlightServerCallContext.

 

command

A GAFlightSQLStatementQuery to be executed.

 

descriptor

A GAFlightDescriptor.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A GAFlightInfo for executing a SQL query on success, NULL on error.

[nullable][transfer full]

Since: 9.0.0

gaflightsql_server_do_get_statement ()

GAFlightDataStream *
gaflightsql_server_do_get_statement (GAFlightSQLServer *server,
                                     GAFlightServerCallContext *context,
                                     GAFlightSQLStatementQueryTicket *ticket,
                                     GError **error);

Parameters

server

A GAFlightServer.

 

context

A GAFlightServerCallContext.

 

ticket

A GAFlightSQLStatementQueryTicket.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A GAFlightDataStream containing the query results on success, NULL on error.

[nullable][transfer full]

Since: 9.0.0

gaflightsql_server_do_put_command_statement_update ()

gint64
gaflightsql_server_do_put_command_statement_update
                               (GAFlightSQLServer *server,
                                GAFlightServerCallContext *context,
                                GAFlightSQLStatementUpdate *command,
                                GError **error);

Parameters

server

A GAFlightServer.

 

context

A GAFlightServerCallContext.

 

command

A GAFlightSQLStatementUpdate.

 

error

Return location for a GError or NULL.

[nullable]

Returns

The number of changed records.

Since: 13.0.0

gaflightsql_server_do_put_prepared_statement_update ()

gint64
gaflightsql_server_do_put_prepared_statement_update
                               (GAFlightSQLServer *server,
                                GAFlightServerCallContext *context,
                                GAFlightSQLPreparedStatementUpdate *command,
                                GAFlightMessageReader *reader,
                                GError **error);

Parameters

server

A GAFlightServer.

 

context

A GAFlightServerCallContext.

 

command

A GAFlightSQLPreparedStatementUpdate.

 

reader

A GAFlightMessageReader that reads uploaded record batches.

 

error

Return location for a GError or NULL.

[nullable]

Returns

The number of changed records.

Since: 14.0.0

gaflightsql_server_create_prepared_statement ()

GAFlightSQLCreatePreparedStatementResult *
gaflightsql_server_create_prepared_statement
                               (GAFlightSQLServer *server,
                                GAFlightServerCallContext *context,
                                GAFlightSQLCreatePreparedStatementRequest *request,
                                GError **error);

Parameters

server

A GAFlightServer.

 

context

A GAFlightServerCallContext.

 

request

A GAFlightSQLCreatePreparedStatementRequest.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A GAFlightSQLCreatePreparedStatementResult containing the dataset and parameter schemas and a handle for created statement on success, NULL on error.

[nullable][transfer full]

Since: 14.0.0

gaflightsql_server_close_prepared_statement ()

void
gaflightsql_server_close_prepared_statement
                               (GAFlightSQLServer *server,
                                GAFlightServerCallContext *context,
                                GAFlightSQLClosePreparedStatementRequest *request,
                                GError **error);

Parameters

server

A GAFlightServer.

 

context

A GAFlightServerCallContext.

 

request

A GAFlightSQLClosePreparedStatementRequest.

 

error

Return location for a GError or NULL.

[nullable]

Since: 14.0.0

Types and Values

GAFLIGHTSQL_TYPE_COMMAND

#define GAFLIGHTSQL_TYPE_COMMAND (gaflightsql_command_get_type())

struct GAFlightSQLCommandClass

struct GAFlightSQLCommandClass {
  GObjectClass parent_class;
};

GAFLIGHTSQL_TYPE_STATEMENT_QUERY

#define GAFLIGHTSQL_TYPE_STATEMENT_QUERY (gaflightsql_statement_query_get_type())

struct GAFlightSQLStatementQueryClass

struct GAFlightSQLStatementQueryClass {
  GAFlightSQLCommandClass parent_class;
};

GAFLIGHTSQL_TYPE_STATEMENT_UPDATE

#define GAFLIGHTSQL_TYPE_STATEMENT_UPDATE (gaflightsql_statement_update_get_type())

struct GAFlightSQLStatementUpdateClass

struct GAFlightSQLStatementUpdateClass {
  GAFlightSQLCommandClass parent_class;
};

GAFLIGHTSQL_TYPE_PREPARED_STATEMENT_UPDATE

#define             GAFLIGHTSQL_TYPE_PREPARED_STATEMENT_UPDATE

struct GAFlightSQLPreparedStatementUpdateClass

struct GAFlightSQLPreparedStatementUpdateClass {
  GAFlightSQLCommandClass parent_class;
};

GAFLIGHTSQL_TYPE_STATEMENT_QUERY_TICKET

#define             GAFLIGHTSQL_TYPE_STATEMENT_QUERY_TICKET

struct GAFlightSQLStatementQueryTicketClass

struct GAFlightSQLStatementQueryTicketClass {
  GAFlightSQLCommandClass parent_class;
};

GAFLIGHTSQL_TYPE_CREATE_PREPARED_STATEMENT_REQUEST

#define             GAFLIGHTSQL_TYPE_CREATE_PREPARED_STATEMENT_REQUEST

struct GAFlightSQLCreatePreparedStatementRequestClass

struct GAFlightSQLCreatePreparedStatementRequestClass {
  GObjectClass parent_class;
};

GAFLIGHTSQL_TYPE_CREATE_PREPARED_STATEMENT_RESULT

#define             GAFLIGHTSQL_TYPE_CREATE_PREPARED_STATEMENT_RESULT

struct GAFlightSQLCreatePreparedStatementResultClass

struct GAFlightSQLCreatePreparedStatementResultClass {
  GObjectClass parent_class;
};

GAFLIGHTSQL_TYPE_CLOSE_PREPARED_STATEMENT_REQUEST

#define             GAFLIGHTSQL_TYPE_CLOSE_PREPARED_STATEMENT_REQUEST

struct GAFlightSQLClosePreparedStatementRequestClass

struct GAFlightSQLClosePreparedStatementRequestClass {
  GObjectClass parent_class;
};

GAFLIGHTSQL_TYPE_SERVER

#define GAFLIGHTSQL_TYPE_SERVER (gaflightsql_server_get_type())

struct GAFlightSQLServerClass

struct GAFlightSQLServerClass {
  GAFlightServerClass parent_class;

  GAFlightInfo *(*get_flight_info_statement)(
    GAFlightSQLServer *server,
    GAFlightServerCallContext *context,
    GAFlightSQLStatementQuery *command,
    GAFlightDescriptor *descriptor,
    GError **error);
  GAFlightDataStream *(*do_get_statement)(
    GAFlightSQLServer *server,
    GAFlightServerCallContext *context,
    GAFlightSQLStatementQueryTicket *ticket,
    GError **error);
  gint64 (*do_put_command_statement_update)(
    GAFlightSQLServer *server,
    GAFlightServerCallContext *context,
    GAFlightSQLStatementUpdate *command,
    GError **error);
  gint64 (*do_put_prepared_statement_update)(
    GAFlightSQLServer *server,
    GAFlightServerCallContext *context,
    GAFlightSQLPreparedStatementUpdate *command,
    GAFlightMessageReader *reader,
    GError **error);
  GAFlightSQLCreatePreparedStatementResult *(*create_prepared_statement)(
    GAFlightSQLServer *server,
    GAFlightServerCallContext *context,
    GAFlightSQLCreatePreparedStatementRequest *request,
    GError **error);
  void (*close_prepared_statement)(
    GAFlightSQLServer *server,
    GAFlightServerCallContext *context,
    GAFlightSQLClosePreparedStatementRequest *request,
    GError **error);
};

Members

get_flight_info_statement ()

A virtual function to implement GetFlightInfoStatment API that gets a GAFlightInfo for executing a SQL query.

 

do_get_statement ()

A virtual function to implement DoGetStatement API that gets a GAFlightDataStream containing the query results.

 

do_put_command_statement_update ()

A virtual function to implement DoPutCommandStatementUpdate API that executes an update SQL statement.

 

do_put_prepared_statement_update ()

A virtual function to implement DoPutPreparedStatementUpdate API that executes an update prepared statement.

 

create_prepared_statement ()

A virtual function to implement CreatePreparedStatement API that creates a prepared statement

 

close_prepared_statement ()

A virtual function to implement ClosePreparedStatement API that closes a prepared statement.

 

Since: 9.0.0

GAFlightSQLClosePreparedStatementRequest

typedef struct _GAFlightSQLClosePreparedStatementRequest GAFlightSQLClosePreparedStatementRequest;

GAFlightSQLCommand

typedef struct _GAFlightSQLCommand GAFlightSQLCommand;

GAFlightSQLCreatePreparedStatementRequest

typedef struct _GAFlightSQLCreatePreparedStatementRequest GAFlightSQLCreatePreparedStatementRequest;

GAFlightSQLCreatePreparedStatementResult

typedef struct _GAFlightSQLCreatePreparedStatementResult GAFlightSQLCreatePreparedStatementResult;

GAFlightSQLPreparedStatementUpdate

typedef struct _GAFlightSQLPreparedStatementUpdate GAFlightSQLPreparedStatementUpdate;

GAFlightSQLServer

typedef struct _GAFlightSQLServer GAFlightSQLServer;

GAFlightSQLStatementQuery

typedef struct _GAFlightSQLStatementQuery GAFlightSQLStatementQuery;

GAFlightSQLStatementQueryTicket

typedef struct _GAFlightSQLStatementQueryTicket GAFlightSQLStatementQueryTicket;

GAFlightSQLStatementUpdate

typedef struct _GAFlightSQLStatementUpdate GAFlightSQLStatementUpdate;

Property Details

The “request” property

  “request”                  gpointer

Owner: GAFlightSQLClosePreparedStatementRequest

Flags: Write / Construct Only

The “command” property

  “command”                  gpointer

The raw command struct.

Owner: GAFlightSQLCommand

Flags: Write / Construct Only

The “request” property

  “request”                  gpointer

Owner: GAFlightSQLCreatePreparedStatementRequest

Flags: Write / Construct Only