Class: QueryBuilder::CQL::Contexts::Trigger

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

Overview

Describes the user-defined trigger for the table

Instance Method Summary collapse

Instance Method Details

#createQueryBuilder::Statements::CreateTrigger

Builds the ‘CREATE TRIGGER’ CQL statement for the current trigger

Returns:

  • (QueryBuilder::Statements::CreateTrigger)


26
27
28
# File 'lib/query_builder/cql/contexts/trigger.rb', line 26

def create
  Statements::CreateTrigger.new(context: self)
end

#dropQueryBuilder::Statements::DropTrigger

Builds the ‘DROP TRIGGER’ CQL statement

Returns:

  • (QueryBuilder::Statements::DropTrigger)


34
35
36
# File 'lib/query_builder/cql/contexts/trigger.rb', line 34

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

#to_sString

Returns the full name of the type

Returns:

  • (String)


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

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