Class: FireRuby::Generator
- Inherits:
-
Object
- Object
- FireRuby::Generator
- Defined in:
- lib/src.rb
Overview
This class represents a Firebird generator entity.
Class Method Summary collapse
-
.create(name, connection) ⇒ Object
This method creates a new generator within a database.
-
.exists?(name, connection) ⇒ Boolean
This method is used to determine whether a named generator exists within a database.
Instance Method Summary collapse
-
#connection ⇒ Object
This is the accessor for the connection attribute.
-
#drop ⇒ Object
This method drops a generator from the database.
-
#initialize(name, connection) ⇒ Generator
constructor
This is the constructor for the Generator class.
-
#last ⇒ Object
This method fetches the last value generator from a generator.
-
#name ⇒ Object
This is the accessor for the name attribute.
-
#next(step) ⇒ Object
This method fetches the next value, depending on a specified increment, from a generator.
Constructor Details
#initialize(name, connection) ⇒ Generator
This is the constructor for the Generator class. Note, this method assumes that the named generator already exists. If it doesn’t then the object will be constructed but will fail during use.
Parameters
- name
-
A string containing the generator name.
- connection
-
A reference to the Connection object that will be used to access the generator.
1138 1139 |
# File 'lib/src.rb', line 1138 def initialize(name, connection) end |
Class Method Details
.create(name, connection) ⇒ Object
This method creates a new generator within a database. This method returns a Generator object is successful.
Parameters
- name
-
A string containing the name for the new generator.
- connection
-
A reference to the Connection object that will be used to create the generator.
Exceptions
- Exception
-
Generated whenever a problem occurs creating the new generator in the database.
1226 1227 |
# File 'lib/src.rb', line 1226 def Generator.create(name, connection) end |
.exists?(name, connection) ⇒ Boolean
This method is used to determine whether a named generator exists within a database.
Parameters
- name
-
A string containing the generator name to check for.
- connection
-
A reference to the Connection object to be used in performing the check.
Exceptions
- Exception
-
Generated whenever a problem occurs determining the existence of the generator.
1209 1210 |
# File 'lib/src.rb', line 1209 def Generator.exists?(name, connection) end |
Instance Method Details
#connection ⇒ Object
This is the accessor for the connection attribute.
1152 1153 |
# File 'lib/src.rb', line 1152 def connection end |
#drop ⇒ Object
This method drops a generator from the database. After a successful call to this method the Generator object may not be used to obtain values unless it is recreated.
Exceptions
- Exception
-
Generated whenever a problem occurs dropping the generator from the database.
1176 1177 |
# File 'lib/src.rb', line 1176 def drop end |
#last ⇒ Object
This method fetches the last value generator from a generator.
Exceptions
- Exception
-
Generated whenever a problem occurs accessing the database generator.
1163 1164 |
# File 'lib/src.rb', line 1163 def last end |
#name ⇒ Object
This is the accessor for the name attribute.
1145 1146 |
# File 'lib/src.rb', line 1145 def name end |
#next(step) ⇒ Object
This method fetches the next value, depending on a specified increment, from a generator.
Parameters
- step
-
The step interval to be applied to the generator to obtain the next value.
Exceptions
- Exception
-
Generated whenever a problem occurs accessing the database generator.
1192 1193 |
# File 'lib/src.rb', line 1192 def next(step) end |