Class: DbMeta::Oracle::Comment

Inherits:
Object
  • Object
show all
Defined in:
lib/db_meta/oracle/types/comment.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



4
5
6
# File 'lib/db_meta/oracle/types/comment.rb', line 4

def text
  @text
end

Class Method Details

.find(args = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/db_meta/oracle/types/comment.rb', line 6

def self.find(args = {})
  connection = Connection.instance.get
  cursor = connection.exec("select comments from user_tab_comments where table_type = '#{args[:type]}' and table_name = '#{args[:name]}'")
  while (row = cursor.fetch)
    @text = row[0]
  end
ensure
  connection.logoff
end