class Fx::Adapters::Sqlserver::Functions
Fetches defined functions from the sqlserver connection. @api private
Constants
- FUNCTIONS_WITH_DEFINITIONS_QUERY
The SQL query used by F(x) to retrieve the functions considered dumpable into ‘db/schema.rb`.
Attributes
connection[R]
Public Class Methods
all(*args)
click to toggle source
Wraps all
as a static facade.
@return [Array<Fx::Function>]
# File lib/fx/adapters/sqlserver/functions.rb, line 24 def self.all(*args) new(*args).all end
new(connection)
click to toggle source
# File lib/fx/adapters/sqlserver/functions.rb, line 28 def initialize(connection) @connection = connection end
Public Instance Methods
all()
click to toggle source
All of the functions that this connection has defined.
@return [Array<Fx::Function>]
# File lib/fx/adapters/sqlserver/functions.rb, line 35 def all functions_from_sqlserver.map { |function| to_fx_function(function) } end
Private Instance Methods
functions_from_sqlserver()
click to toggle source
# File lib/fx/adapters/sqlserver/functions.rb, line 43 def functions_from_sqlserver connection.exec_query(FUNCTIONS_WITH_DEFINITIONS_QUERY) end
to_fx_function(result)
click to toggle source
# File lib/fx/adapters/sqlserver/functions.rb, line 47 def to_fx_function(result) Fx::Function.new(result) end