Class: PgEventstore::SubscriptionsSet
Overview
Defines ruby’s representation of subscriptions_set record.
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
included, #initialize, #options_hash, #readonly!, #readonly?
Instance Attribute Details
#created_at ⇒ Time?
54
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 54
attribute(:created_at)
|
#id ⇒ Integer?
26
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 26
attribute(:id)
|
#last_error ⇒ Hash?
48
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 48
attribute(:last_error)
|
#last_error_occurred_at ⇒ Time?
51
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 51
attribute(:last_error_occurred_at)
|
#last_restarted_at ⇒ Time?
44
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 44
attribute(:last_restarted_at)
|
#max_restarts_number ⇒ Integer?
38
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 38
attribute(:max_restarts_number)
|
#name ⇒ String?
29
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 29
attribute(:name)
|
#restart_count ⇒ Integer?
35
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 35
attribute(:restart_count)
|
#state ⇒ String?
32
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 32
attribute(:state)
|
#time_between_restarts ⇒ Integer?
41
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 41
attribute(:time_between_restarts)
|
#updated_at ⇒ Time?
57
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 57
attribute(:updated_at)
|
Class Method Details
12
13
14
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 12
def create(attrs)
new(**subscriptions_set_queries.create(attrs))
end
|
Instance Method Details
#==(other) ⇒ Boolean
105
106
107
108
109
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 105
def ==(other)
return false unless other.is_a?(SubscriptionsSet)
id == other.id
end
|
#assign_attributes(attrs) ⇒ Hash
61
62
63
64
65
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 61
def assign_attributes(attrs)
attrs.each do |attr, value|
public_send("#{attr}=", value)
end
end
|
#delete ⇒ void
74
75
76
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 74
def delete
subscriptions_set_queries.delete(id)
end
|
Dup the current object without assigned connection
80
81
82
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 80
def dup
SubscriptionsSet.new(**Utils.deep_dup(options_hash))
end
|
#eql?(other) ⇒ Boolean
97
98
99
100
101
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 97
def eql?(other)
return false unless other.is_a?(SubscriptionsSet)
hash == other.hash
end
|
#hash ⇒ Integer
91
92
93
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 91
def hash
id.hash
end
|
85
86
87
88
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 85
def reload
assign_attributes(subscriptions_set_queries.find!(id))
self
end
|
#update(attrs) ⇒ Hash
69
70
71
|
# File 'lib/pg_eventstore/subscriptions/subscriptions_set.rb', line 69
def update(attrs)
assign_attributes(subscriptions_set_queries.update(id, attrs))
end
|