Server related classes

Server related classes

Functions

Properties

gpointer command Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ├── GAFlightServer
       ╰── GAFlightSQLServer
    ╰── GAFlightSQLCommand
        ├── GAFlightSQLStatementQuery
        ├── GAFlightSQLStatementQueryTicket
        ╰── GAFlightSQLStatementUpdate

Implemented Interfaces

GAFlightSQLServer implements GAFlightServable.

Includes

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

Description

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_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_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

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_STATEMENT_QUERY_TICKET

#define             GAFLIGHTSQL_TYPE_STATEMENT_QUERY_TICKET

struct GAFlightSQLStatementQueryTicketClass

struct GAFlightSQLStatementQueryTicketClass {
  GAFlightSQLCommandClass 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);
};

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.

 

Since: 9.0.0

GAFlightSQLCommand

typedef struct _GAFlightSQLCommand GAFlightSQLCommand;

GAFlightSQLServer

typedef struct _GAFlightSQLServer GAFlightSQLServer;

GAFlightSQLStatementQuery

typedef struct _GAFlightSQLStatementQuery GAFlightSQLStatementQuery;

GAFlightSQLStatementQueryTicket

typedef struct _GAFlightSQLStatementQueryTicket GAFlightSQLStatementQueryTicket;

GAFlightSQLStatementUpdate

typedef struct _GAFlightSQLStatementUpdate GAFlightSQLStatementUpdate;

Property Details

The “command” property

  “command”                  gpointer

The raw command struct.

Owner: GAFlightSQLCommand

Flags: Write / Construct Only