Method: DbMeta::Oracle::Function#fetch
- Defined in:
- lib/db_meta/oracle/types/function.rb
#fetch(args = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/db_meta/oracle/types/function.rb', line 8 def fetch(args = {}) @source = "" connection_class = args[:connection_class] || Connection connection = connection_class.instance.get cursor = connection.exec("select text from user_source where type = 'FUNCTION' and name = '#{@name}' order by line") while (row = cursor.fetch) @source << row[0].to_s end cursor.close ensure connection.logoff end |