purview 1.3.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +9 -0
  3. data/TODO +7 -6
  4. data/lib/purview/columns/base.rb +35 -3
  5. data/lib/purview/databases/base.rb +84 -231
  6. data/lib/purview/databases/mysql.rb +42 -108
  7. data/lib/purview/databases/postgresql.rb +45 -111
  8. data/lib/purview/exceptions/{could_not_baseline.rb → could_not_baseline_table.rb} +1 -1
  9. data/lib/purview/exceptions/{could_not_disable.rb → could_not_disable_table.rb} +1 -1
  10. data/lib/purview/exceptions/{could_not_enable.rb → could_not_enable_table.rb} +1 -1
  11. data/lib/purview/exceptions/{could_not_find_table_metadata.rb → could_not_find_metadata_for_table.rb} +1 -1
  12. data/lib/purview/exceptions/{could_not_initialize.rb → could_not_initialize_table.rb} +1 -1
  13. data/lib/purview/exceptions/{could_not_lock.rb → could_not_lock_table.rb} +1 -1
  14. data/lib/purview/exceptions/{could_not_sync.rb → could_not_sync_table.rb} +1 -1
  15. data/lib/purview/exceptions/{could_not_unlock.rb → could_not_unlock_table.rb} +1 -1
  16. data/lib/purview/exceptions/could_not_update_metadata_for_table.rb +9 -0
  17. data/lib/purview/exceptions/{database_already_assigned.rb → database_already_assigned_for_table.rb} +1 -1
  18. data/lib/purview/exceptions/{no_window.rb → no_window_for_table.rb} +1 -1
  19. data/lib/purview/exceptions/rows_outside_window_for_table.rb +18 -0
  20. data/lib/purview/exceptions/table_already_assigned_for_column.rb +17 -0
  21. data/lib/purview/exceptions/{table_already_assigned.rb → table_already_assigned_for_index.rb} +1 -1
  22. data/lib/purview/exceptions/{wrong_database.rb → wrong_database_for_table.rb} +1 -1
  23. data/lib/purview/exceptions.rb +15 -13
  24. data/lib/purview/indices/base.rb +6 -1
  25. data/lib/purview/loaders/base.rb +2 -25
  26. data/lib/purview/mixins/dialect.rb +29 -0
  27. data/lib/purview/mixins.rb +1 -0
  28. data/lib/purview/parsers/base.rb +3 -2
  29. data/lib/purview/parsers/csv.rb +13 -3
  30. data/lib/purview/pullers/base_sql.rb +6 -25
  31. data/lib/purview/structs/table_metadata.rb +0 -14
  32. data/lib/purview/tables/base.rb +28 -106
  33. data/lib/purview/tables/base_syncable.rb +113 -0
  34. data/lib/purview/tables/raw.rb +1 -1
  35. data/lib/purview/tables/table_metadata.rb +43 -0
  36. data/lib/purview/tables.rb +3 -0
  37. data/lib/purview/version.rb +1 -1
  38. metadata +20 -15
  39. data/lib/purview/exceptions/rows_outside_window.rb +0 -18
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: purview
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan W. Zaleski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-05 00:00:00.000000000 Z
11
+ date: 2015-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -112,20 +112,22 @@ files:
112
112
  - lib/purview/exceptions.rb
113
113
  - lib/purview/exceptions/base.rb
114
114
  - lib/purview/exceptions/base_table.rb
115
- - lib/purview/exceptions/could_not_baseline.rb
116
- - lib/purview/exceptions/could_not_disable.rb
117
- - lib/purview/exceptions/could_not_enable.rb
118
- - lib/purview/exceptions/could_not_find_table_metadata.rb
119
- - lib/purview/exceptions/could_not_initialize.rb
120
- - lib/purview/exceptions/could_not_lock.rb
121
- - lib/purview/exceptions/could_not_sync.rb
122
- - lib/purview/exceptions/could_not_unlock.rb
123
- - lib/purview/exceptions/database_already_assigned.rb
115
+ - lib/purview/exceptions/could_not_baseline_table.rb
116
+ - lib/purview/exceptions/could_not_disable_table.rb
117
+ - lib/purview/exceptions/could_not_enable_table.rb
118
+ - lib/purview/exceptions/could_not_find_metadata_for_table.rb
119
+ - lib/purview/exceptions/could_not_initialize_table.rb
120
+ - lib/purview/exceptions/could_not_lock_table.rb
121
+ - lib/purview/exceptions/could_not_sync_table.rb
122
+ - lib/purview/exceptions/could_not_unlock_table.rb
123
+ - lib/purview/exceptions/could_not_update_metadata_for_table.rb
124
+ - lib/purview/exceptions/database_already_assigned_for_table.rb
124
125
  - lib/purview/exceptions/no_table.rb
125
- - lib/purview/exceptions/no_window.rb
126
- - lib/purview/exceptions/rows_outside_window.rb
127
- - lib/purview/exceptions/table_already_assigned.rb
128
- - lib/purview/exceptions/wrong_database.rb
126
+ - lib/purview/exceptions/no_window_for_table.rb
127
+ - lib/purview/exceptions/rows_outside_window_for_table.rb
128
+ - lib/purview/exceptions/table_already_assigned_for_column.rb
129
+ - lib/purview/exceptions/table_already_assigned_for_index.rb
130
+ - lib/purview/exceptions/wrong_database_for_table.rb
129
131
  - lib/purview/indices.rb
130
132
  - lib/purview/indices/base.rb
131
133
  - lib/purview/indices/composite.rb
@@ -139,6 +141,7 @@ files:
139
141
  - lib/purview/loggers/console.rb
140
142
  - lib/purview/mixins.rb
141
143
  - lib/purview/mixins/connection.rb
144
+ - lib/purview/mixins/dialect.rb
142
145
  - lib/purview/mixins/helpers.rb
143
146
  - lib/purview/mixins/logger.rb
144
147
  - lib/purview/parsers.rb
@@ -172,7 +175,9 @@ files:
172
175
  - lib/purview/structs/window.rb
173
176
  - lib/purview/tables.rb
174
177
  - lib/purview/tables/base.rb
178
+ - lib/purview/tables/base_syncable.rb
175
179
  - lib/purview/tables/raw.rb
180
+ - lib/purview/tables/table_metadata.rb
176
181
  - lib/purview/types.rb
177
182
  - lib/purview/types/base.rb
178
183
  - lib/purview/types/boolean.rb
@@ -1,18 +0,0 @@
1
- module Purview
2
- module Exceptions
3
- class RowsOutsideWindow < Base
4
- def initialize(table_name, count)
5
- @table_name = table_name
6
- @count = count
7
- end
8
-
9
- def message
10
- "#{count} row(s) outside window for table: #{table_name}"
11
- end
12
-
13
- private
14
-
15
- attr_reader :count, :table_name
16
- end
17
- end
18
- end