def getSchema( dbid )
      @dbid = dbid

      if @cacheSchemas and @cachedSchemas and @cachedSchemas[dbid]
         @responseXMLdoc = @cachedSchemas[dbid]
      else
         sendRequest( :getSchema )
         if @cacheSchemas and @requestSucceeded
            @cachedSchemas ||= {}
            @cachedSchemas[dbid] ||= @responseXMLdoc.dup
         end
      end

      @chdbids = getResponseElement( "table/chdbids" )
      @variables = getResponseElement( "table/variables" )
      @fields = getResponseElement( "table/fields" )
      @queries = getResponseElement( "table/queries" )
      @table = getResponseElement( :table )
      @key_fid = getResponseElement( "table/original/key_fid" )
      @key_fid = @key_fid.text if @key_fid and @key_fid.has_text?

      return self if @chainAPIcalls

      if @table and block_given?
         @table.each { |element| yield element }
      else
         @table
      end
    end
def getSchema( dbid )
      @dbid = dbid

      if @cacheSchemas and @cachedSchemas and @cachedSchemas[dbid]
         @responseXMLdoc = @cachedSchemas[dbid]
      else
         sendRequest( :getSchema )
         if @cacheSchemas and @requestSucceeded
            @cachedSchemas ||= {}
            @cachedSchemas[dbid] ||= @responseXMLdoc.dup
         end
      end

      @chdbids = getResponseElement( "table/chdbids" )
      @variables = getResponseElement( "table/variables" )
      @fields = getResponseElement( "table/fields" )
      @queries = getResponseElement( "table/queries" )
      @table = getResponseElement( :table )
      @key_fid = getResponseElement( "table/original/key_fid" )
      @key_fid = @key_fid.text if @key_fid and @key_fid.has_text?

      return self if @chainAPIcalls

      if @table and block_given?
         @table.each { |element| yield element }
      else
         @table
      end
    end
API_GetSchema