View Source Astarte.Core.CQLUtils (astarte_core v1.2.0)

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

Link to this function

endpoint_id(interface_name, interface_major, endpoint)

View Source

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

Link to this function

endpoint_to_db_column_name(endpoint_name)

View Source

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

Link to this function

interface_descriptor_statement()

View Source

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

Link to this function

interface_id(interface_name, interface_major)

View Source

Returns interface UUID for a certain interface_name with a certain interface_major

Link to this function

interface_name_to_table_name(interface_name, major_version)

View Source

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

Link to this function

is_valid_cql_name?(cql_name)

View Source

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

Link to this function

mapping_value_type_to_db_type(value_type)

View Source

Returns a CQL type for a given mapping value type atom

Link to this function

realm_name_to_keyspace_name(realm_name, astarte_instance_id \\ "")

View Source
@spec realm_name_to_keyspace_name(nonempty_binary(), binary()) :: nonempty_binary()
Link to this function

type_to_db_column_name(column_type)

View Source

Returns table column name that stores a certain type.