Astarte.Core.CQLUtils (astarte_core v1.3.0)

Copy Markdown View Source

This module contains a set of functions that should be used to map Astarte types and concepts to C*

Summary

Functions

returns an endpoint UUID for a certain endpoint on a certain interface_name with a certain interface_major.

Returns the column name for a certain endpoint that will be used for object interface tables.

Returns the CQL query statement that should be used to retrieve interface descriptor from the database.

Returns interface UUID for a certain interface_name with a certain interface_major

Returns a generated table name that might be used during table creation."

Returns true if a given CQL name can be safely used for a table or a column name

Returns a CQL type for a given mapping value type atom

Returns table column name that stores a certain type.

Functions

endpoint_id(interface_name, interface_major, endpoint)

returns an endpoint UUID for a certain endpoint on a certain interface_name with a certain interface_major.

endpoint_to_db_column_name(endpoint_name)

Returns the column name for a certain endpoint that will be used for object interface tables.

interface_descriptor_statement()

Returns the CQL query statement that should be used to retrieve interface descriptor from the database.

interface_id(interface_name, interface_major)

Returns interface UUID for a certain interface_name with a certain interface_major

interface_name_to_table_name(interface_name, major_version)

Returns a generated table name that might be used during table creation."

is_valid_cql_name?(cql_name)

Returns true if a given CQL name can be safely used for a table or a column name

mapping_value_type_to_db_type(value_type)

Returns a CQL type for a given mapping value type atom

realm_name_to_keyspace_name(realm_name, astarte_instance_id \\ "")

@spec realm_name_to_keyspace_name(nonempty_binary(), binary()) :: nonempty_binary()

type_to_db_column_name(column_type)

Returns table column name that stores a certain type.