Class: DbDom::Xerces::DatabaseElement

Inherits:
Object
  • Object
show all
Defined in:
lib/xerces.rb

Instance Method Summary collapse

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

#synchronizeChildrenObject



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