Class: QueryBuilder::CQL::Contexts::Function

Inherits:
Base
  • Object
show all
Defined in:
lib/query_builder/cql/contexts/function.rb

Overview

Describes the Cassandra user-defined function

Instance Method Summary collapse

Instance Method Details

#create(language, body) ⇒ QueryBuilder::Statements::CreateFunction

Builds the ‘CREATE FUNCTION’ CQL statement

Parameters:

Returns:

  • (QueryBuilder::Statements::CreateFunction)


29
30
31
32
# File 'lib/query_builder/cql/contexts/function.rb', line 29

def create(language, body)
  Statements::CreateFunction
    .new(context: self, language: language, body: body)
end

#dropQueryBuilder::Statements::DropFunction

Builds the ‘DROP FUNCTION’ CQL statement

Returns:

  • (QueryBuilder::Statements::DropFunction)


38
39
40
# File 'lib/query_builder/cql/contexts/function.rb', line 38

def drop
  Statements::DropFunction.new(context: self)
end

#to_sString

Returns the full name of the function

Returns:

  • (String)


18
19
20
# File 'lib/query_builder/cql/contexts/function.rb', line 18

def to_s
  [keyspace, name].join(".")
end