UltipaDocs
Try Playground
  • Introduction
  • Terminologies
    • Graphset
    • Schema
    • Property
    • Constraints
    • Insert
    • Overwrite or Insert
    • Upsert
    • Update
    • Delete
    • Find Nodes
    • Find Edges
      • AB
      • Autonet
      • Spread
      • Path Template
      • K-Hop
      • K-Hop Template
    • GROUP BY
    • ORDER BY
    • SKIP
    • LIMIT
    • WHERE
    • RETURN
    • WITH
    • UNCOLLECT
    • UNION
    • UNION ALL
    • CALL
    • All Functions
    • Path Functions
    • Aggregate Functions
    • Mathematical Functions
    • Trigonometric Functions
    • String Functions
    • List Functions
    • Datetime Functions
    • Spatial Functions
    • Table Functions
    • Null Functions
    • Type Conversion Functions
  • Operators
  • Expressions
    • Index
    • Full-text Index
    • Vector Index
    • Cache
    • Overview
    • Managing HDC Graphs
    • HDC Graph Queries
    • Process
    • Job
    • Execution Plan
    • Alias
    • Filter
    • Values and Types
    • Data Flow in Queries
    • Comments
    • Reserved Words
  • Access Control
  1. Docs
  2. /
  3. UQL
  4. /
  5. Functions

Type Conversion Functions

toDouble()

Converts a value to a double-precision floating-point number.

SyntaxtoDouble(<value>)
ArgumentsNameTypeDescription
<value>Numeric, TextualThe input value
Return TypeDOUBLE
UQL
uncollect [-36.123456789012345, "-36.123abc", "a10"] as item
return table(item, toDouble(item))

Result:

itemtoDouble(item)
-36.123456789012336.1234567890123
-36.123abc-36.123
a100

toFloat()

Converts a value to a single-precision floating-point number.

SyntaxtoFloat(<value>)
ArgumentsNameTypeDescription
<value>Numeric, TextualThe input value
Return TypeFLOAT
UQL
uncollect [-36.123456789012345, "-36.123abc", "a10"] as item
return table(item, toFloat(item))

Result:

itemtoFloat(item)
-36.1234567890123-36.12346
-36.123abc-36.123
a100

toInteger()

Converts a value to a 64-bit integer.

SyntaxtoInteger(<value>)
ArgumentsNameTypeDescription
<value>Numeric, TextualThe input value
Return TypeINT64
UQL
uncollect [-36.123456789012345, "-36.123abc", "a10"] as item
return table(item, toInteger(item))

Result:

itemtoInteger(item)
-36.1234567890123-36
-36.123abc-36
a100

toString()

Converts a value to a string.

SyntaxtoString(<value>)
ArgumentsNameTypeDescription
<value>Numeric, TextualThe input value
Return TypeSTRING
UQL
uncollect [24, 0.000000001, [23,21]] as item
return toString(item)

Result:

toString(item)
24
1e-09
[23,21]