Class: Flydata::Source::SyncGenerateTableDdl
- Defined in:
- lib/flydata/source/sync_generate_table_ddl.rb
Direct Known Subclasses
Flydata::SourceMysql::SyncGenerateTableDdl, Flydata::SourceZendesk::SyncGenerateTableDdl
Instance Attribute Summary collapse
-
#dp ⇒ Object
readonly
Returns the value of attribute dp.
Class Method Summary collapse
Instance Method Summary collapse
-
#generate_flydata_tabledef(tables, options) ⇒ Object
Public Interface: Generate FlyData table definitions for given tables.
-
#initialize(source, dp, options) ⇒ SyncGenerateTableDdl
constructor
A new instance of SyncGenerateTableDdl.
-
#run_compatibility_check ⇒ Object
Public Interface: Run compatibility check.
Constructor Details
#initialize(source, dp, options) ⇒ SyncGenerateTableDdl
Returns a new instance of SyncGenerateTableDdl.
13 14 15 16 |
# File 'lib/flydata/source/sync_generate_table_ddl.rb', line 13 def initialize(source, dp, ) super(source, ) @dp = dp end |
Instance Attribute Details
#dp ⇒ Object (readonly)
Returns the value of attribute dp.
17 18 19 |
# File 'lib/flydata/source/sync_generate_table_ddl.rb', line 17 def dp @dp end |
Class Method Details
Instance Method Details
#generate_flydata_tabledef(tables, options) ⇒ Object
Public Interface: Generate FlyData table definitions for given tables
tables - An array of table names options - A hash of options
Returns flydata_tabledefs, errors
flydata_tablesdefs - An array of FlyData tabledefs
errors - An array of error hashes for tables whose tabledef generation failed
37 38 39 |
# File 'lib/flydata/source/sync_generate_table_ddl.rb', line 37 def generate_flydata_tabledef(tables, ) raise UnsupportedSourceError, "subclass must implement" end |
#run_compatibility_check ⇒ Object
Public Interface: Run compatibility check
Run whatever check (compatibility, connectivity, privilege, etc) to ensure that the ‘sync:generate_table_ddl’ command can run without an issue.
Raises exception when check fails
25 26 27 |
# File 'lib/flydata/source/sync_generate_table_ddl.rb', line 25 def run_compatibility_check raise UnsupportedSourceError, "subclass must implement" end |