Class: Fx::Adapters::Sqlserver::Functions Private
- Inherits:
-
Object
- Object
- Fx::Adapters::Sqlserver::Functions
- Defined in:
- lib/fx/adapters/sqlserver/functions.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Fetches defined functions from the sqlserver connection.
Constant Summary collapse
- FUNCTIONS_WITH_DEFINITIONS_QUERY =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
The SQL query used by F(x) to retrieve the functions considered dumpable into ‘db/schema.rb`.
<<-STR SELECT routine_name AS name, routine_definition AS definition FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_type = 'FUNCTION' STR
Class Method Summary collapse
-
.all(*args) ⇒ Array<Fx::Function>
private
Wraps #all as a static facade.
Instance Method Summary collapse
-
#all ⇒ Array<Fx::Function>
private
All of the functions that this connection has defined.
-
#initialize(connection) ⇒ Functions
constructor
private
A new instance of Functions.
Constructor Details
#initialize(connection) ⇒ Functions
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Functions.
28 29 30 |
# File 'lib/fx/adapters/sqlserver/functions.rb', line 28 def initialize(connection) @connection = connection end |
Class Method Details
.all(*args) ⇒ Array<Fx::Function>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Wraps #all as a static facade.
24 25 26 |
# File 'lib/fx/adapters/sqlserver/functions.rb', line 24 def self.all(*args) new(*args).all end |
Instance Method Details
#all ⇒ Array<Fx::Function>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
All of the functions that this connection has defined.
35 36 37 |
# File 'lib/fx/adapters/sqlserver/functions.rb', line 35 def all functions_from_sqlserver.map { |function| to_fx_function(function) } end |