NebulaGraph Python Client 5.3.0
Loading...
Searching...
No Matches
ValueWrapper Class Reference

Public Member Functions

 __init__ (self, Any value, ColumnType data_type)
 
bool is_null (self)
 
bool is_bool (self)
 
bool is_long (self)
 
bool is_int (self)
 
bool is_float (self)
 
bool is_double (self)
 
bool is_string (self)
 
bool is_list (self)
 
bool is_node (self)
 
bool is_edge (self)
 
bool is_local_time (self)
 
bool is_zoned_time (self)
 
bool is_local_datetime (self)
 
bool is_zoned_datetime (self)
 
bool is_date (self)
 
bool is_record (self)
 
bool is_duration (self)
 
bool is_path (self)
 
bool is_decimal (self)
 
 as_bool (self)
 
 as_int (self)
 
 as_long (self)
 
 as_string (self)
 
 as_float (self)
 
 as_double (self)
 
 as_list (self)
 
 as_node (self)
 
 as_edge (self)
 
 as_local_time (self)
 
 as_zoned_time (self)
 
 as_date (self)
 
 as_local_datetime (self)
 
 as_zoned_datetime (self)
 
 as_duration (self)
 
 as_record (self)
 
 as_path (self)
 
 as_decimal (self)
 
 as_embedding_vector (self)
 
TargetType cast (self)
 
T cast (self, Type[T] target_type)
 
Union[T, TargetType] cast (self, Optional[Type[T]] target_type=None)
 
Any cast_primitive (self)
 
 __eq__ (self, other)
 
int __hash__ (self)
 

Public Attributes

 value
 
 data_type
 

Detailed Description

Definition at line 39 of file value_wrapper.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
Any  value,
ColumnType  data_type 
)

Definition at line 42 of file value_wrapper.py.

Member Function Documentation

◆ __eq__()

__eq__ (   self,
  other 
)

Definition at line 357 of file value_wrapper.py.

◆ __hash__()

int __hash__ (   self)

Definition at line 362 of file value_wrapper.py.

+ Here is the caller graph for this function:

◆ as_bool()

as_bool (   self)

Definition at line 244 of file value_wrapper.py.

◆ as_date()

as_date (   self)

Definition at line 277 of file value_wrapper.py.

◆ as_decimal()

as_decimal (   self)

Definition at line 295 of file value_wrapper.py.

◆ as_double()

as_double (   self)

Definition at line 259 of file value_wrapper.py.

◆ as_duration()

as_duration (   self)

Definition at line 286 of file value_wrapper.py.

◆ as_edge()

as_edge (   self)

Definition at line 268 of file value_wrapper.py.

◆ as_embedding_vector()

as_embedding_vector (   self)

Definition at line 298 of file value_wrapper.py.

◆ as_float()

as_float (   self)

Definition at line 256 of file value_wrapper.py.

◆ as_int()

as_int (   self)

Definition at line 247 of file value_wrapper.py.

◆ as_list()

as_list (   self)

Definition at line 262 of file value_wrapper.py.

◆ as_local_datetime()

as_local_datetime (   self)

Definition at line 280 of file value_wrapper.py.

◆ as_local_time()

as_local_time (   self)

Definition at line 271 of file value_wrapper.py.

◆ as_long()

as_long (   self)

Definition at line 250 of file value_wrapper.py.

◆ as_node()

as_node (   self)

Definition at line 265 of file value_wrapper.py.

◆ as_path()

as_path (   self)

Definition at line 292 of file value_wrapper.py.

◆ as_record()

as_record (   self)

Definition at line 289 of file value_wrapper.py.

◆ as_string()

as_string (   self)

Definition at line 253 of file value_wrapper.py.

◆ as_zoned_datetime()

as_zoned_datetime (   self)

Definition at line 283 of file value_wrapper.py.

◆ as_zoned_time()

as_zoned_time (   self)

Definition at line 274 of file value_wrapper.py.

◆ cast() [1/3]

TargetType cast (   self)
Get self.value

Definition at line 302 of file value_wrapper.py.

+ Here is the caller graph for this function:

◆ cast() [2/3]

Union[T, TargetType] cast (   self,
Optional[Type[T]]   target_type = None 
)

Definition at line 311 of file value_wrapper.py.

+ Here is the caller graph for this function:

◆ cast() [3/3]

T cast (   self,
Type[T]  target_type 
)
Get self.value, with target_type check

Definition at line 307 of file value_wrapper.py.

+ Here is the caller graph for this function:

◆ cast_primitive()

Any cast_primitive (   self)
Convert the wrapped value to primitive Python types recursively.

For basic types, uses cast()
For composite types (Path, Node, Edge), calls cast_primitive()
For containers (Map, List, Record), recursively calls cast_primitive() on elements

Definition at line 329 of file value_wrapper.py.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_bool()

bool is_bool (   self)
Check if the Value is Boolean type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_BOOL

Definition at line 56 of file value_wrapper.py.

◆ is_date()

bool is_date (   self)
Check if the Value is Date type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_DATE

Definition at line 194 of file value_wrapper.py.

◆ is_decimal()

bool is_decimal (   self)
Check if the Value is Decimal type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_DECIMAL

Definition at line 234 of file value_wrapper.py.

+ Here is the call graph for this function:

◆ is_double()

bool is_double (   self)
Check if the Value is Double type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_FLOAT64

Definition at line 104 of file value_wrapper.py.

◆ is_duration()

bool is_duration (   self)
Check if the Value is Duration type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_DURATION

Definition at line 214 of file value_wrapper.py.

◆ is_edge()

bool is_edge (   self)
Check if the Value is Edge type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_EDGE

Definition at line 144 of file value_wrapper.py.

◆ is_float()

bool is_float (   self)
Check if the Value is Float type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_FLOAT32

Definition at line 94 of file value_wrapper.py.

◆ is_int()

bool is_int (   self)
Check if the Value is Int type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_UINT8 or COLUMN_TYPE_INT8 or COLUMN_TYPE_UINT16
        or COLUMN_TYPE_INT16 or COLUMN_TYPE_UINT32 or COLUMN_TYPE_INT32

Definition at line 76 of file value_wrapper.py.

◆ is_list()

bool is_list (   self)
Check if the Value is List type.

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_LIST

Definition at line 124 of file value_wrapper.py.

◆ is_local_datetime()

bool is_local_datetime (   self)
Check if the Value is Local Datetime type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_LOCALDATETIME

Definition at line 174 of file value_wrapper.py.

◆ is_local_time()

bool is_local_time (   self)
Check if the Value is Local Time type.

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_LOCALTIME

Definition at line 154 of file value_wrapper.py.

◆ is_long()

bool is_long (   self)
Check if the Value is Long type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_UINT64 or COLUMN_TYPE_INT64

Definition at line 66 of file value_wrapper.py.

◆ is_node()

bool is_node (   self)
Check if the Value is Node type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_NODE

Definition at line 134 of file value_wrapper.py.

◆ is_null()

bool is_null (   self)
If the value is null

Returns
-------
    bool: true if value is null

Definition at line 46 of file value_wrapper.py.

◆ is_path()

bool is_path (   self)
Check if the Value is Path type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_PATH

Definition at line 224 of file value_wrapper.py.

◆ is_record()

bool is_record (   self)
Check if the Value is Record type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_RECORD

Definition at line 204 of file value_wrapper.py.

◆ is_string()

bool is_string (   self)
Check if the Value is String type.

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_STRING

Definition at line 114 of file value_wrapper.py.

◆ is_zoned_datetime()

bool is_zoned_datetime (   self)
Check if the Value is Zoned Datetime type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_ZONEDDATETIME

Definition at line 184 of file value_wrapper.py.

◆ is_zoned_time()

bool is_zoned_time (   self)
Check if the Value is Zoned Time type

Returns
-------
    bool: true if Value's type is COLUMN_TYPE_ZONEDTIME

Definition at line 164 of file value_wrapper.py.

Member Data Documentation

◆ data_type

data_type

Definition at line 44 of file value_wrapper.py.

◆ value

value

Definition at line 43 of file value_wrapper.py.


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