Skip to content
REL
REFERENCE
Data Types
Meta

Data Types: Metadata Types

RelName

RelName tests whether a value corresponds to a Symbol. A Symbol begins with the character :.

Strictly speaking, Symbols are metadata and result in specialized relations.

They are used extensively in modules — see Modules. The column names of imported CSV files are of type RelName. See CSV Import for details.

Construction

RelName constants start with a ::

// query
 
def T = :bar
 
module T
    def foo = true
end
 
def output = T

Type Relation: RelName(x)

RelName(x) tests whether x is a RelName:

// query
 
def mymodule:f = 1
 
ic { subset(mymodule, (RelName, Int)) }
 
def output = mymodule

Noteworthy Operations

relname_string converts RelName into String:

// query
 
def output:string = relname_string[:foo]

Examples

// query
 
module myrel
   def foo = 1
end
def myrel:bar = 2
 
ic relname_ic {subset(myrel, (RelName, Int))}
 
def names(name) = myrel(name, _)
ic names_ic { subset(names, RelName) }
 
def output = names

Next: Other Data Types

Was this doc helpful?