Skip to content

string

relationalai.semantics.std.strings
string(
s: (
StringValue
| IntegerValue
| FloatValue
| NumberValue
| DateTimeValue
| DateValue
),
) -> Expression

Convert a value to a string representation.

Parameters

  • s

    (StringValue | IntegerValue | FloatValue | NumberValue | DateTimeValue | DateValue) - The value to convert.

Returns

  • Expression - An Expression representing the String conversion of the input. Returns String.

Examples

Convert various types to strings:

strings.string(123)
strings.string(3.14)
strings.string(date(2024, 1, 15))

Referenced By

RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Use advanced reasoning > Rules-based reasoning
        └──  Work with strings
            └──  Convert values to strings