Class: DbDom::Xerces::DatabaseElement
- Inherits:
-
Object
- Object
- DbDom::Xerces::DatabaseElement
- Defined in:
- lib/xerces.rb
Instance Method Summary collapse
-
#initialize(doc) ⇒ DatabaseElement
constructor
A new instance of DatabaseElement.
- #synchronizeChildren ⇒ Object
Constructor Details
#initialize(doc) ⇒ DatabaseElement
Returns a new instance of DatabaseElement.
23 24 25 26 27 |
# File 'lib/xerces.rb', line 23 def initialize(doc) super(doc, "database") needsSyncChildren(true) @updating = false end |
Instance Method Details
#synchronizeChildren ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/xerces.rb', line 29 def synchronizeChildren return if @updating # avoid re-entrancy @updating = true Java::Jdbc.with_connection(ownerDocument.settings) do |conn| Java::Jdbc.get_tables(conn) do |name| appendChild(TableElement.new(ownerDocument, name)); end end super @updating = false end |