Decimal classes

Decimal classes

Functions

Properties

gpointer decimal128 Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── GArrowDecimal128

Includes

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

Description

GArrowDecimal128 is a 128-bit decimal class.

Functions

garrow_decimal128_new_string ()

GArrowDecimal128 *
garrow_decimal128_new_string (const gchar *data);

Parameters

data

The data of the decimal.

 

Returns

A newly created GArrowDecimal128.

Since: 0.10.0


garrow_decimal128_new_integer ()

GArrowDecimal128 *
garrow_decimal128_new_integer (const gint64 data);

Parameters

data

The data of the decimal.

 

Returns

A newly created GArrowDecimal128.

Since: 0.10.0


garrow_decimal128_to_string_scale ()

gchar *
garrow_decimal128_to_string_scale (GArrowDecimal128 *decimal,
                                   gint32 scale);

Parameters

decimal

A GArrowDecimal128.

 

scale

The scale of the decimal.

 

Returns

The string representation of the decimal.

It should be freed with g_free() when no longer needed.

Since: 0.10.0


garrow_decimal128_to_string ()

gchar *
garrow_decimal128_to_string (GArrowDecimal128 *decimal);

Parameters

decimal

A GArrowDecimal128.

 

Returns

The string representation of the decimal.

It should be freed with g_free() when no longer needed.

Since: 0.10.0


garrow_decimal128_abs ()

void
garrow_decimal128_abs (GArrowDecimal128 *decimal);

Computes the absolute value of the decimal destructively.

Parameters

decimal

A GArrowDecimal128.

 

Since: 0.10.0


garrow_decimal128_negate ()

void
garrow_decimal128_negate (GArrowDecimal128 *decimal);

Negate the current value of the decimal destructively.

Parameters

decimal

A GArrowDecimal128.

 

Since: 0.10.0


garrow_decimal128_to_integer ()

gint64
garrow_decimal128_to_integer (GArrowDecimal128 *decimal);

Parameters

decimal

A GArrowDecimal128.

 

Returns

The 64-bit integer representation of the decimal.

Since: 0.10.0

Types and Values

GARROW_TYPE_DECIMAL128

#define GARROW_TYPE_DECIMAL128 (garrow_decimal128_get_type())

struct GArrowDecimal128Class

struct GArrowDecimal128Class {
  GObjectClass parent_class;
};

GArrowDecimal128

typedef struct _GArrowDecimal128 GArrowDecimal128;

Property Details

The “decimal128” property

  “decimal128”               gpointer

The raw std::shared<arrow::Decimal128> *.

Flags: Write / Construct Only