Class: Rubyfb::Generator
- Inherits:
-
Object
- Object
- Rubyfb::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.
1143 1144 |
# File 'lib/src.rb', line 1143 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.
1231 1232 |
# File 'lib/src.rb', line 1231 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.
1214 1215 |
# File 'lib/src.rb', line 1214 def Generator.exists?(name, connection) end |
Instance Method Details
#connection ⇒ Object
This is the accessor for the connection attribute.
1157 1158 |
# File 'lib/src.rb', line 1157 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.
1181 1182 |
# File 'lib/src.rb', line 1181 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.
1168 1169 |
# File 'lib/src.rb', line 1168 def last end |
#name ⇒ Object
This is the accessor for the name attribute.
1150 1151 |
# File 'lib/src.rb', line 1150 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.
1197 1198 |
# File 'lib/src.rb', line 1197 def next(step) end |