Class: Purview::Tables::TableMetadata
- Inherits:
-
Base
show all
- Defined in:
- lib/purview/tables/table_metadata.rb
Instance Attribute Summary
Attributes inherited from Base
#columns, #database, #indices, #name
Instance Method Summary
collapse
Methods inherited from Base
#column_names, #columns_by_name, #columns_by_source_name
#logger, #logger_opts, #logger_type, #with_context_logging
#blank?, #coalesced, #filter_blank_values, #filter_nil_values, #present?, #timestamp, #with_timestamp, #zero?
Constructor Details
Returns a new instance of TableMetadata.
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/purview/tables/table_metadata.rb', line 4
def initialize(database)
super(
:table_metadata,
:columns => [
table_name_column,
enabled_at_column,
last_pulled_at_column,
last_updated_at_column,
locked_at_column,
max_timestamp_pulled_column,
],
:database => database
)
end
|
Instance Method Details
#enabled_at_column ⇒ Object
19
20
21
|
# File 'lib/purview/tables/table_metadata.rb', line 19
def enabled_at_column
Purview::Columns::Timestamp.new(:enabled_at)
end
|
#last_pulled_at_column ⇒ Object
23
24
25
|
# File 'lib/purview/tables/table_metadata.rb', line 23
def last_pulled_at_column
Purview::Columns::Timestamp.new(:last_pulled_at)
end
|
#last_updated_at_column ⇒ Object
27
28
29
|
# File 'lib/purview/tables/table_metadata.rb', line 27
def last_updated_at_column
Purview::Columns::Timestamp.new(:last_updated_at)
end
|
#locked_at_column ⇒ Object
31
32
33
|
# File 'lib/purview/tables/table_metadata.rb', line 31
def locked_at_column
Purview::Columns::Timestamp.new(:locked_at)
end
|
#max_timestamp_pulled_column ⇒ Object
35
36
37
|
# File 'lib/purview/tables/table_metadata.rb', line 35
def max_timestamp_pulled_column
Purview::Columns::Timestamp.new(:max_timestamp_pulled)
end
|
#table_name_column ⇒ Object
39
40
41
42
43
44
45
|
# File 'lib/purview/tables/table_metadata.rb', line 39
def table_name_column
Purview::Columns::Id.new(
:table_name,
:type => Purview::Types::String,
:limit => 255,
)
end
|