Kinetica   C#   API  Version 7.2.3.1
KineticaType.Column Class Reference

Public Types

enum  ColumnType {
  ColumnType.BYTES = (int)Avro.Schema.Type.Bytes,
  ColumnType.DOUBLE = (int)Avro.Schema.Type.Double,
  ColumnType.FLOAT = (int)Avro.Schema.Type.Float,
  ColumnType.INT = (int)Avro.Schema.Type.Int,
  ColumnType.LONG = (int)Avro.Schema.Type.Long,
  ColumnType.STRING = (int)Avro.Schema.Type.String,
  ColumnType.BOOLEAN = (int)Avro.Schema.Type.Boolean,
  ColumnType.DEFAULT = (int)Avro.Schema.Type.Error
}
 

Public Member Functions

 Column (string name, ColumnType type, IList< string >? properties=null)
 Creates a Column object from the given name, type, and properties. More...
 
string getName ()
 Returns the name of the column. More...
 
ColumnType getType ()
 Returns the enumeration for the column type. More...
 
bool isNullable ()
 Returns if the column is nullable. More...
 
IList< string > getProperties ()
 Returns the properties for the column. More...
 
bool isDecimal ()
 Returns whether this column is a decimal type. More...
 
int getDecimalPrecision ()
 Returns the precision for decimal columns. More...
 
int getDecimalScale ()
 Returns the scale for decimal columns. More...
 
int getDecimalByteSize ()
 Returns the byte size needed to store decimal values for this column. More...
 
string getTypeString ()
 Returns the string format of the data type. More...
 
override string ToString ()
 

Public Attributes

const int DEFAULT_DECIMAL_PRECISION = 18
 Default precision for decimal columns (matches Java API). More...
 
const int DEFAULT_DECIMAL_SCALE = 4
 Default scale for decimal columns (matches Java API). More...
 
const int DECIMAL8_MAX_PRECISION = 18
 Maximum precision for 8-byte decimals. More...
 

Detailed Description

Definition at line 12 of file KineticaType.cs.

Member Enumeration Documentation

◆ ColumnType

Enumerator
BYTES 
DOUBLE 
FLOAT 
INT 
LONG 
STRING 
BOOLEAN 
DEFAULT 

Definition at line 14 of file KineticaType.cs.

Constructor & Destructor Documentation

◆ Column()

KineticaType.Column.Column ( string  name,
ColumnType  type,
IList< string >?  properties = null 
)
inline

Creates a Column object from the given name, type, and properties.

Parameters
name
type
properties

Definition at line 62 of file KineticaType.cs.

Member Function Documentation

◆ getDecimalByteSize()

int KineticaType.Column.getDecimalByteSize ( )
inline

Returns the byte size needed to store decimal values for this column.

Returns 8 for precision <= 18, or 12 for precision > 18.

Returns
The byte size (8 or 12) for storing decimal values.

Definition at line 121 of file KineticaType.cs.

◆ getDecimalPrecision()

int KineticaType.Column.getDecimalPrecision ( )
inline

Returns the precision for decimal columns.

For non-decimal columns, returns DEFAULT_DECIMAL_PRECISION.

Returns
The total number of digits in the decimal.

Definition at line 107 of file KineticaType.cs.

◆ getDecimalScale()

int KineticaType.Column.getDecimalScale ( )
inline

Returns the scale for decimal columns.

For non-decimal columns, returns DEFAULT_DECIMAL_SCALE.

Returns
The number of digits after the decimal point.

Definition at line 114 of file KineticaType.cs.

◆ getName()

string KineticaType.Column.getName ( )
inline

Returns the name of the column.

Returns

Definition at line 76 of file KineticaType.cs.

◆ getProperties()

IList<string> KineticaType.Column.getProperties ( )
inline

Returns the properties for the column.

Returns

Definition at line 94 of file KineticaType.cs.

◆ getType()

ColumnType KineticaType.Column.getType ( )
inline

Returns the enumeration for the column type.

Returns

Definition at line 82 of file KineticaType.cs.

◆ getTypeString()

string KineticaType.Column.getTypeString ( )
inline

Returns the string format of the data type.

Returns

Definition at line 129 of file KineticaType.cs.

◆ isDecimal()

bool KineticaType.Column.isDecimal ( )
inline

Returns whether this column is a decimal type.

Returns
True if the column has a decimal property.

Definition at line 100 of file KineticaType.cs.

◆ isNullable()

bool KineticaType.Column.isNullable ( )
inline

Returns if the column is nullable.

Returns

Definition at line 88 of file KineticaType.cs.

◆ ToString()

override string KineticaType.Column.ToString ( )
inline

Definition at line 217 of file KineticaType.cs.

Member Data Documentation

◆ DECIMAL8_MAX_PRECISION

const int KineticaType.Column.DECIMAL8_MAX_PRECISION = 18

Maximum precision for 8-byte decimals.

Decimals with precision > 18 use 12 bytes.

Definition at line 39 of file KineticaType.cs.

◆ DEFAULT_DECIMAL_PRECISION

const int KineticaType.Column.DEFAULT_DECIMAL_PRECISION = 18

Default precision for decimal columns (matches Java API).

Definition at line 29 of file KineticaType.cs.

◆ DEFAULT_DECIMAL_SCALE

const int KineticaType.Column.DEFAULT_DECIMAL_SCALE = 4

Default scale for decimal columns (matches Java API).

Definition at line 34 of file KineticaType.cs.


The documentation for this class was generated from the following file: