redisgraph v0.1.0 RedisGraph.Util View Source

Provides utility functions for RedisGraph modules.

Link to this section Summary

Functions

Surround a string with single quotes if not already.

Generate a random string of characters a-z of length n.

Link to this section Functions

Link to this function

quote_string(v)

View Source
quote_string(any()) :: any()

Surround a string with single quotes if not already.

This is used to serialize strings when preparing redisgraph queries. If the passed value is not a string, it is returned unchanged

Link to this function

random_string(n \\ 10)

View Source
random_string(pos_integer()) :: String.t()

Generate a random string of characters a-z of length n.

This is used to create a random alias for a node if one is not already set.