ibruby 0.5.1-mswin32

Sign up to get free protection for your applications and to get access to all the features.
data/lib/src.rb ADDED
@@ -0,0 +1,1794 @@
1
+ #
2
+ # This file is a stand-in that allows for the generation of rdoc documentation
3
+ # for the IBRuby extension for the Ruby programming language. The extension
4
+ # is coded in C and documented with Doxygen comments, so this file is used to
5
+ # generate the native Ruby documentation instead.
6
+ #
7
+
8
+ #
9
+ # This module contains all of the classes and definitions relating to the
10
+ # IBRuby extension for the Ruby language.
11
+ #
12
+ module IBRuby
13
+ #
14
+ # This class provides the exception type used by the IBRuby library.
15
+ #
16
+ class IBRubyException
17
+ #
18
+ # This is the constructor for the IBRubyError class.
19
+ #
20
+ # ==== Parameters
21
+ # message:: A string containing the error message for the object.
22
+ #
23
+ def initialize(message)
24
+ end
25
+
26
+
27
+ #
28
+ # This is the accessor for the error message attribute
29
+ #
30
+ def message
31
+ end
32
+
33
+
34
+ #
35
+ # This is the accessor for the SQL code attribute.
36
+ #
37
+ def sql_code
38
+ end
39
+
40
+
41
+ #
42
+ # This is the accessor for the database code attribute.
43
+ #
44
+ def db_code
45
+ end
46
+
47
+
48
+ #
49
+ # This function generates a simple description string for a IBRubyError
50
+ # object.
51
+ #
52
+ def to_s
53
+ end
54
+ end
55
+
56
+
57
+ #
58
+ # This class represents an existing database that can be connected to. It
59
+ # also provides functionality to allow for the creation of new databases.
60
+ #
61
+ class Database
62
+ #
63
+ # This is the constructor for the Database class.
64
+ #
65
+ # ==== Parameters
66
+ # file:: A string containing the database file specifier. This can
67
+ # include details for a remote server if needed.
68
+ # set:: A string containing the name of the character set to be
69
+ # used with the database. Defaults to nil.
70
+ #
71
+ def initialize(file, set=nil)
72
+ end
73
+
74
+
75
+ #
76
+ # This is the accessor for the database file specification attribute.
77
+ #
78
+ def file
79
+ end
80
+
81
+
82
+ #
83
+ # This method attempts to establish a connection to a database. If
84
+ # successful then a Connection instance is returned. If a block is
85
+ # provided to the method then the connection is closed after the
86
+ # block completes. If a block is specified the connection is provided
87
+ # as a parameter to the block.
88
+ #
89
+ # ==== Parameters
90
+ # user:: The user name to be used in making the connection. This
91
+ # defaults to nil.
92
+ # password:: The password to be used in making the connection. This
93
+ # defaults to nil.
94
+ # options:: A Hash of connection options. This should be made up of
95
+ # key/setting pairs where the keys are from the list that
96
+ # is defined within the Connection class. The settings are
97
+ # particular to the key, see the documentation for the
98
+ # Connection class for more details.
99
+ #
100
+ # ==== Exceptions
101
+ # Exception:: Thrown whenever a problem occurs connecting with the
102
+ # database.
103
+ #
104
+ def connect(user=nil, password=nil, options=nil)
105
+ yield(connection)
106
+ end
107
+
108
+
109
+ #
110
+ # This method attempts to drop the database referred to by the details
111
+ # in a Database object.
112
+ #
113
+ # ==== Parameters
114
+ # user:: The user name to be used in dropping the database.
115
+ # password:: The password to be used in dropping the database.
116
+ #
117
+ # ==== Exceptions
118
+ # IBRubyError:: Thrown whenever a problem occurs dropping the database
119
+ # instance.
120
+ #
121
+ def drop(user, password)
122
+ end
123
+
124
+
125
+ #
126
+ # This method can be used to programmatically created a database file.
127
+ # If successful this method returns a Database object.
128
+ #
129
+ # ==== Parameters
130
+ # file:: A string containing the path and name of the database file
131
+ # to be created.
132
+ # user:: A string containing the user name that will be used in
133
+ # creating the file.
134
+ # password:: A string containing the user password that will be used in
135
+ # creating the file.
136
+ # size:: The page size setting to be used with the new database file.
137
+ # This should be 1024, 2048, 4096 or 8192. Defaults to 1024.
138
+ # set:: The name of the default character set to be assigned to the
139
+ # new database file. If this parameter is specifed then the
140
+ # Database object created by the call will use it to whenever
141
+ # a connection request is made. Defaults to nil.
142
+ #
143
+ # ==== Exceptions
144
+ # Exception:: Generated whenever an invalid parameter is specified or a
145
+ # problem occurs creating the database file.
146
+ #
147
+ def Database.create(file, user, password, size=1024, set=nil)
148
+ end
149
+
150
+
151
+ #
152
+ # This method fetches the name of the character set currently assigned
153
+ # to a Database object. This can return nil to indicate that a explicit
154
+ # character set has not been assigned.
155
+ #
156
+ def character_set
157
+ end
158
+
159
+
160
+ #
161
+ # This method allows the specification of a database character set that
162
+ # will be used when creating connections to a database. The value set by
163
+ # this method can be overridden by providing an alternative in the connect
164
+ # call. To remove a character set specification from a Database object
165
+ # pass nil to this method.
166
+ #
167
+ # ==== Parameters
168
+ # set:: A string containing the name of the database character set.
169
+ #
170
+ def character_set=(set)
171
+ end
172
+ end
173
+
174
+
175
+ #
176
+ # This class represents a connection with a InterBase database.
177
+ #
178
+ class Connection
179
+ # A definition for a connection option. This option should be given a
180
+ # setting of either true or false.
181
+ MARK_DATABASE_DAMAGED = 17
182
+
183
+
184
+ # A definition for a connection option. This option should be given a
185
+ # setting of Connection::WRITE_ASYNCHRONOUS or
186
+ # Connection::WRITE_SYNCHRONOUS
187
+ WRITE_POLICY = 24
188
+
189
+
190
+ # A definition for a connection option. This option should be given a
191
+ # string setting which should be the name of the character set to be
192
+ # used by the connection.
193
+ CHARACTER_SET = 48
194
+
195
+
196
+ # A definition for a connection option. This option should be given a
197
+ # string setting which should be the name of the message file to be used
198
+ # by the connection.
199
+ MESSAGE_FILE = 47
200
+
201
+
202
+ # A definition for a connection option. This option should be given a
203
+ # an integer setting. Values between 1 and 255 are valid, with 75 being
204
+ # the default.
205
+ NUMBER_OF_CACHE_BUFFERS = 5
206
+
207
+
208
+ # A definition for a connection option. This option should be given a
209
+ # string value which should be the database DBA user name.
210
+ DBA_USER_NAME = 19
211
+
212
+
213
+ # A definition for a possible setting to accompany the WRITE_POLICY
214
+ # connection setting.
215
+ WRITE_ASYNCHONOUS = 0
216
+
217
+
218
+ # A definition for a possible setting to accompany the WRITE_POLICY
219
+ # connection setting.
220
+ WRITE_SYNCHONOUS = 1
221
+
222
+
223
+ #
224
+ # This is the constructor for the Connection class.
225
+ #
226
+ # ==== Parameters
227
+ # database:: A reference to the Database object to be connected to.
228
+ # user:: A reference to the user name to be used in making the
229
+ # database connection. Defaults to nil.
230
+ # password:: A reference to the user password to be used in making the
231
+ # connection. Defaults to nil.
232
+ # options:: A Hash containing the options to be applied to the new
233
+ # connection. The hash will contain key/setting values, with
234
+ # the keys being based on the option constants defined within
235
+ # the Connection class. Individual options have differing
236
+ # value requirements. See the option documentation entries
237
+ # for further details. Defaults to nil.
238
+ #
239
+ # ==== Exceptions
240
+ # Exception:: Generated whenever an invalid database is specified to
241
+ # the method or an issue occurs establishing the database
242
+ # connection.
243
+ #
244
+ def initialize(database, user, password, options)
245
+ end
246
+
247
+
248
+ #
249
+ # This method is used to determine whether a Connection object represents
250
+ # an active database connection.
251
+ #
252
+ def open?
253
+ end
254
+
255
+
256
+ #
257
+ # This method is used to determine whether a Connection object represents
258
+ # an inactive database connection.
259
+ #
260
+ def closed?
261
+ end
262
+
263
+
264
+ #
265
+ # This method detaches a Connection object from a database. The object
266
+ # may not be used for database functionality following a successful call
267
+ # to this method. The close method will fail if there are outstanding
268
+ # transactions for a connection.
269
+ #
270
+ # ==== Exceptions
271
+ # Exception:: Generated whenever the connection has at least one open
272
+ # transaction or an error occurs closing the connection.
273
+ #
274
+ def close
275
+ end
276
+
277
+
278
+ #
279
+ # This is the accessor method for the database attribute.
280
+ #
281
+ def database
282
+ end
283
+
284
+
285
+ #
286
+ # This method retrieves the user name that was used in creating a
287
+ # Connection object.
288
+ #
289
+ def user
290
+ end
291
+
292
+
293
+ #
294
+ # This method generates a simple descriptive string for a Connection
295
+ # object.
296
+ #
297
+ def to_s
298
+ end
299
+
300
+
301
+ #
302
+ # This method starts a new transaction against a connection. A successful
303
+ # call to this method returns a Transaction object. The transaction that
304
+ # is started relates to the Connection it was called upon only. To start
305
+ # a transaction that covers multiple connections use the Transaction
306
+ # class. This method accepts a block, taking a single parameter which
307
+ # will be the transaction created. This transaction is committed if the
308
+ # block completes normally or rolls back if an exception is thrown from
309
+ # the block.
310
+ #
311
+ # ==== Exceptions
312
+ # Exception:: Thrown whenever a problem occurs starting the transaction.
313
+ #
314
+ def start_transaction
315
+ yield transaction
316
+ end
317
+
318
+
319
+ #
320
+ # This function executes a SQL statement against a connection. If the
321
+ # statement represented a SQL query then a ResultSet object is returned.
322
+ # If the statement was a non-query SQL statement then an Integer is
323
+ # returned indicating the number of rows affected by the statement. For
324
+ # all other types of statement the method returns nil. The method also
325
+ # accepts a block that takes a single parameter. This block will be
326
+ # executed once for each row in any result set generated.
327
+ #
328
+ # ==== Parameters
329
+ # sql:: The SQL statement to be executed.
330
+ # transaction:: The transaction to execute the SQL statement within.
331
+ #
332
+ # ==== Exceptions
333
+ # Exception:: Generated if an error occurs executing the SQL statement.
334
+ #
335
+ def execute(sql, transaction)
336
+ yield(row)
337
+ end
338
+
339
+
340
+ #
341
+ # This function executes a SQL statement against a connection. This
342
+ # differs from the execute method in that an anonymous transaction is
343
+ # used in executing the statement. The output from this method is the
344
+ # same as for the execute method. The method also accepts a block that
345
+ # takes a single parameter. This block will be executed once for each
346
+ # row in any result set generated.
347
+ #
348
+ # ==== Parameters
349
+ # sql:: The SQL statement to be executed.
350
+ #
351
+ # ==== Exceptions
352
+ # Exception:: Generated whenever a problem occurs executing the SQL
353
+ # statement.
354
+ #
355
+ def execute_immediate(sql)
356
+ yield(row)
357
+ end
358
+ end
359
+
360
+
361
+ #
362
+ # This class represents an InterBase database transaction. There may be
363
+ # multiple transaction outstanding against a connection at any one time.
364
+ #
365
+ class Transaction
366
+ TPB_VERSION_1 = 1
367
+ TPB_VERSION_3 = 3
368
+ TPB_CONSISTENCY = 1
369
+ TPB_CONCURRENCY = 2
370
+ TPB_SHARED = 3
371
+ TPB_PROTECTED = 4
372
+ TPB_EXCLUSIVE = 5
373
+ TPB_WAIT = 6
374
+ TPB_NO_WAIT = 7
375
+ TPB_READ = 8
376
+ TPB_WRITE = 9
377
+ TPB_LOCK_READ = 10
378
+ TPB_LOCK_WRITE = 11
379
+ TPB_VERB_TIME = 12
380
+ TPB_COMMIT_TIME = 13
381
+ TPB_IGNORE_LIMBO = 14
382
+ TPB_READ_COMMITTED = 15
383
+ TPB_AUTO_COMMIT = 16
384
+ TPB_REC_VERSION = 17
385
+ TPB_NO_REC_VERSION = 18
386
+ TPB_RESTART_REQUESTS = 19
387
+ # Transaction parameter buffer value constants.
388
+ TPB_NO_AUTO_UNDO = 20
389
+
390
+
391
+ #
392
+ # This is the constructor for the Transaction class.
393
+ #
394
+ # ==== Parameters
395
+ # connections:: Either a single instance of the Connection class or
396
+ # an array of Connection instances to specify a
397
+ # multi-database transaction.
398
+ #
399
+ # ==== Exceptions
400
+ # Exception:: Generated whenever the method is passed an invalid
401
+ # parameter or a problem occurs creating the transaction.
402
+ #
403
+ def initialize(connections)
404
+ end
405
+
406
+
407
+ #
408
+ # This method is used to determine whether a Transaction object is still
409
+ # valid for use (i.e. commit or rollback has not been called for the
410
+ # Transaction).
411
+ #
412
+ def active?
413
+ end
414
+
415
+
416
+ #
417
+ # This is the accessor for the connections attribute. This method returns
418
+ # an array of the connections that the transaction applies to.
419
+ #
420
+ def connections
421
+ end
422
+
423
+
424
+ #
425
+ # This method is used to determine whether a given Transaction applies to
426
+ # a specified Connection.
427
+ #
428
+ # ==== Parameters
429
+ # connection:: A reference to the Connection object to perform the test
430
+ # for.
431
+ #
432
+ def for_connection?(connection)
433
+ end
434
+
435
+
436
+ #
437
+ # This method commits the details outstanding against a Transaction
438
+ # object. The Transaction object may not be reused after a successful
439
+ # call to this method.
440
+ #
441
+ # ==== Exceptions
442
+ # Exception:: Generated whenever a problem occurs committing the details
443
+ # of the transaction.
444
+ #
445
+ def commit
446
+ end
447
+
448
+
449
+ #
450
+ # This method rolls back the details outstanding against a Transaction
451
+ # object. The Transaction object may not be reused after a successful
452
+ # call to this method.
453
+ #
454
+ # ==== Exceptions
455
+ # Exception:: Generated whenever a problem occurs rolling back the
456
+ # details of the transaction.
457
+ #
458
+ def rollback
459
+ end
460
+
461
+
462
+ #
463
+ # This method executes a SQL statement using a Transaction object. This
464
+ # method will only work whenever a Transaction object applies to a
465
+ # single Connection as it would otherwise be impossible to determine
466
+ # which connection to execute against. If the statement executed was a
467
+ # SQL query then the method returns a ResultSet object. For non-query SQL
468
+ # statements (insert, update or delete) the method returns an Integer that
469
+ # contains the number of rows affected by the statement. For all other
470
+ # statements the method returns nil. The method also accepts a block that
471
+ # takes a single parameter. If the SQL statement was a query the block
472
+ # will be invoked and passed each row retrieved.
473
+ #
474
+ # ==== Parameters
475
+ # sql:: A string containing the SQL statement to be executed.
476
+ #
477
+ # ==== Exceptions
478
+ # Exception:: Generated whenever the Transaction object represents more
479
+ # than one connection or a problem occurs executing the SQL
480
+ # statement.
481
+ #
482
+ def execute(sql)
483
+ yield(row)
484
+ end
485
+
486
+
487
+ #
488
+ # This method allows for the creation of a Transaction object with
489
+ # non-standard settings.
490
+ #
491
+ # ==== Parameters
492
+ # connections:: Either a single Connection object or an array of
493
+ # Connection objects that the new Transaction will
494
+ # be associated with.
495
+ # parameters:: An array of the parameters to be used in creating
496
+ # the new constants. Populate this from the TPB
497
+ # constants defined within the class.
498
+ #
499
+ # ==== Exceptions
500
+ # IBRubyError:: Generated whenever a problem occurs creating the
501
+ # transaction.
502
+ #
503
+ def Transaction.create(connections, parameters)
504
+ end
505
+ end
506
+
507
+
508
+ #
509
+ # This class represents a prepared SQL statement that may be executed more
510
+ # than once.
511
+ #
512
+ class Statement
513
+ # A definition for a SQL statement type constant.
514
+ SELECT_STATEMENT = 1
515
+
516
+ # A definition for a SQL statement type constant.
517
+ INSERT_STATEMENT = 2
518
+
519
+ # A definition for a SQL statement type constant.
520
+ UPDATE_STATEMENT = 3
521
+
522
+ # A definition for a SQL statement type constant.
523
+ DELETE_STATEMENT = 4
524
+
525
+ # A definition for a SQL statement type constant.
526
+ DDL_STATEMENT = 5
527
+
528
+ # A definition for a SQL statement type constant.
529
+ GET_SEGMENT_STATEMENT = 6
530
+
531
+ # A definition for a SQL statement type constant.
532
+ PUT_SEGMENT_STATEMENT = 7
533
+
534
+ # A definition for a SQL statement type constant.
535
+ EXECUTE_PROCEDURE_STATEMENT = 8
536
+
537
+ # A definition for a SQL statement type constant.
538
+ START_TRANSACTION_STATEMENT = 9
539
+
540
+ # A definition for a SQL statement type constant.
541
+ COMMIT_STATEMENT = 10
542
+
543
+ # A definition for a SQL statement type constant.
544
+ ROLLBACK_STATEMENT = 11
545
+
546
+ # A definition for a SQL statement type constant.
547
+ SELECT_FOR_UPDATE_STATEMENT = 12
548
+
549
+ # A definition for a SQL statement type constant.
550
+ SET_GENERATOR_STATEMENT = 13
551
+
552
+ # A definition for a SQL statement type constant.
553
+ SAVE_POINT_STATEMENT = 14
554
+
555
+ #
556
+ # This is the constructor for the Statement class.
557
+ #
558
+ # ==== Parameters
559
+ # connection:: The Connection object that the SQL statement will be
560
+ # executed through.
561
+ # transaction:: The Transaction object that the SQL statement will be
562
+ # executed under.
563
+ # sql:: The SQL statement to be prepared for execution.
564
+ # dialect:: The InterBase dialect to be used in preparing the SQL
565
+ # statement.
566
+ #
567
+ def initialize(connection, transaction, sql, dialect)
568
+ end
569
+
570
+
571
+ #
572
+ # This is the accessor for the connection attribute.
573
+ #
574
+ def connection
575
+ end
576
+
577
+
578
+ #
579
+ # This is the accessor for the transaction attribute.
580
+ #
581
+ def transaction
582
+ end
583
+
584
+
585
+ #
586
+ # This is the accessor for the SQL statement attribute.
587
+ #
588
+ def sql
589
+ end
590
+
591
+
592
+ #
593
+ # This is the accessor for the dialect attribute.
594
+ #
595
+ def dialect
596
+ end
597
+
598
+
599
+ #
600
+ # This method is used to determine the type of a SQL statement. The method
601
+ # will return one of the constant SQL types defined within the class.
602
+ #
603
+ def type
604
+ end
605
+
606
+
607
+ #
608
+ # This method fetches a count of the number of dynamic parameters for
609
+ # a statement object (i.e. the number of parameters that must be provided
610
+ # with values before the SQL statement can be executed).
611
+ #
612
+ def parameter_count
613
+ end
614
+
615
+
616
+ #
617
+ # This method executes the SQL statement within a Statement object. This
618
+ # method returns a ResultSet object if the statement executed was a SQL
619
+ # query. For non-query SQL statements (insert, update or delete) it
620
+ # returns an Integer indicating the number of affected rows. For all other
621
+ # statements the method returns nil. This method accepts a block taking a
622
+ # single parameter. If this block is provided and the statement is a query
623
+ # then the rows returned by the query will be passed, one at a time, to
624
+ # the block.
625
+ #
626
+ # ==== Exception
627
+ # Exception:: Generated if the Statement object actual requires some
628
+ # parameters or a problem occurs executing the SQL statement.
629
+ #
630
+ def execute
631
+ yield row
632
+ end
633
+
634
+
635
+ #
636
+ # This method executes the SQL statement within a Statement object and
637
+ # passes it a set of parameters. Parameterized statements use question
638
+ # marks as place holders for values that may change between calls to
639
+ # execute the statement. This method returns a ResultSet object if the
640
+ # statement executed was a SQL query. If the statement was a non-query SQL
641
+ # statement (insert, update or delete) then the method returns a count of
642
+ # the number of rows affected. For all other types of statement the method
643
+ # returns nil. This method accepts a block taking a single parameter. If
644
+ # this block is provided and the statement is a query then the rows
645
+ # returned by the query will be passed, one at a time, to the block.
646
+ #
647
+ # ==== Parameters
648
+ # parameters:: An array of the parameters for the statement. An effort
649
+ # will be made to convert the values passed in to the
650
+ # appropriate types but no guarantees are made (especially
651
+ # in the case of text fields, which will simply use to_s
652
+ # if the object passed is not a String).
653
+ #
654
+ # ==== Exception
655
+ # Exception:: Generated whenever a problem occurs translating one of the
656
+ # input parameters or executing the SQL statement.
657
+ #
658
+ def execute_for(parameters)
659
+ yield row
660
+ end
661
+
662
+
663
+ #
664
+ # This method releases the database resources associated with a Statement
665
+ # object and should be explicitly called when a Statement object is of
666
+ # no further use.
667
+ #
668
+ # ==== Exceptions
669
+ # IBRubyError:: Generated whenever a problem occurs closing the
670
+ # statement object.
671
+ #
672
+ def close
673
+ end
674
+ end
675
+
676
+
677
+ #
678
+ # This class represents the results of a SQL query executed against a
679
+ # database. The viable lifespan of a ResultSet object is limited by the
680
+ # transaction that was used in it's creation. Once this transaction has
681
+ # been committed or rolled back all related ResultSet object are invalidated
682
+ # and can no longer be used.
683
+ #
684
+ class ResultSet
685
+ include Enumerable
686
+
687
+ #
688
+ # This is the constructor for the ResultSet object.
689
+ #
690
+ # ==== Parameters
691
+ # connection:: A reference to the Connection object that will be used
692
+ # to execute the SQL query.
693
+ # transaction:: A reference to the Transaction object that will be used
694
+ # in executing the SQL query.
695
+ # sql:: A reference to a String containing the SQL query that
696
+ # will be executed.
697
+ # dialect:: A reference to an integer containing the InterBase dialect
698
+ # to be used in executing the SQL statement.
699
+ #
700
+ # ==== Exceptions
701
+ # IBRubyException:: Generated whenever a non-query SQL statement is
702
+ # specified, an invalid connection or transaction is
703
+ # provided or a problem occurs executing the SQL
704
+ # against the database.
705
+ #
706
+ def initialize(connection, transaction, sql, dialect)
707
+ end
708
+
709
+
710
+ #
711
+ # This is the accessor for the connection attribute.
712
+ #
713
+ def connection
714
+ end
715
+
716
+
717
+ #
718
+ # This is the accessor for the transaction attribute.
719
+ #
720
+ def transaction
721
+ end
722
+
723
+
724
+ #
725
+ # This is the accessor for the sql attribute.
726
+ #
727
+ def sql
728
+ end
729
+
730
+
731
+ #
732
+ # This is the accessor for the dialect attribute.
733
+ #
734
+ def dialect
735
+ end
736
+
737
+
738
+ #
739
+ # This method fetches a count of the number of columns in a row of data
740
+ # that the ResultSet can fetch.
741
+ #
742
+ def column_count
743
+ end
744
+
745
+
746
+ #
747
+ # This method fetches the name associated with a specified column for a
748
+ # ResultSet object.
749
+ #
750
+ # ==== Parameters
751
+ # column:: A reference to the column number to fetch the details for.
752
+ # Column numbers start at zero.
753
+ #
754
+ def column_name(column)
755
+ end
756
+
757
+
758
+ #
759
+ # This method fetches the alias associated with a specified column for a
760
+ # ResultSet object.
761
+ #
762
+ # ==== Parameters
763
+ # column:: A reference to the column number to fetch the details for.
764
+ # Column numbers start at zero.
765
+ #
766
+ def column_alias(column)
767
+ end
768
+
769
+
770
+ #
771
+ # This method fetches the table name associated with a specified column
772
+ # for a ResultSet object.
773
+ #
774
+ # ==== Parameters
775
+ # column:: A reference to the column number to fetch the details for.
776
+ # Column numbers start at zero.
777
+ #
778
+ def column_table(column)
779
+ end
780
+
781
+
782
+ #
783
+ # This method fetches a single rows worth of data from the ResultSet
784
+ # object. If the set contains more rows then an array containing the
785
+ # row data will be retrieved. If the ResultSet is exhausted (i.e. all
786
+ # rows have been fetched) then nil is returned. Translation of the row
787
+ # data into an appropriate Ruby type is performed on the row data that
788
+ # is extracted.
789
+ #
790
+ def fetch
791
+ end
792
+
793
+
794
+ #
795
+ # This method is used to determine if all of the rows have been retrieved
796
+ # from a ResultSet object. This method will always return false until
797
+ # the fetch method has been called at least once so it cannot be used to
798
+ # detect a result set that returns no rows.
799
+ #
800
+ def exhausted?
801
+ end
802
+
803
+
804
+ #
805
+ # This method fetches a count of the total number of rows retrieved
806
+ # from a result set.
807
+ #
808
+ def row_count
809
+ end
810
+
811
+
812
+ #
813
+ # This method provides an iterator for the (remaining) rows contained in
814
+ # a ResultSet object.
815
+ #
816
+ # ==== Parameters
817
+ # block:: A block that takes a single parameter. This will be called for
818
+ # and passed each remaining row (as per the fetch method) from
819
+ # the ResultSet.
820
+ #
821
+ def each(&block)
822
+ end
823
+
824
+
825
+ #
826
+ # This method releases the database resources associated with a ResultSet
827
+ # object and should be explicitly called when a ResultSet object is of
828
+ # no further use. The method is implicitly called if the rows available
829
+ # from a ResultSet are exhausted but calling this method at that time
830
+ # will not cause an error.
831
+ #
832
+ # ==== Exceptions
833
+ # IBRubyError:: Generated whenever a problem occurs closing the result
834
+ # set object.
835
+ #
836
+ def close
837
+ end
838
+
839
+ #
840
+ # This method retrieves the base SQL type for a column of data within a
841
+ # ResultSet object. The method returns one of the base types defined in
842
+ # the SQLType class but does not return an actual SQLType object.
843
+ #
844
+ # ==== Parameters
845
+ # index:: The offset from the ResultSet first column of the column to
846
+ # return the type information for.
847
+ #
848
+ def get_base_type(index)
849
+ end
850
+ end
851
+
852
+
853
+ #
854
+ # This class models a row of data fetched as part of a SQL query.
855
+ #
856
+ class Row
857
+ include Enumerable
858
+
859
+ #
860
+ # This is the constructor for the Row class. This method shouldn't really
861
+ # be used as Row objects are automatically created by ResultSets.
862
+ #
863
+ # ==== Parameters
864
+ # results:: The ResultSet object that the row relates to.
865
+ # data:: An array containing the row data values.
866
+ # number:: The row number for the new row.
867
+ #
868
+ def initialize(results, data, number)
869
+ end
870
+
871
+ #
872
+ # This is the accessor for the row number attribute. This will generally
873
+ # reflect the order the row was fetched from the result set in, with 1
874
+ # being the first row retrieved.
875
+ #
876
+ def number
877
+ end
878
+
879
+
880
+ #
881
+ # This method fetches a count of the number of columns of data that are
882
+ # available from a row.
883
+ #
884
+ def column_count
885
+ end
886
+
887
+
888
+ #
889
+ # This method fetches the name of a column within a row of data.
890
+ #
891
+ # ==== Parameters
892
+ # index:: The index of the column to fetch the name for. The first
893
+ # column in the row is at offset zero.
894
+ #
895
+ def column_name(index)
896
+ end
897
+
898
+
899
+ #
900
+ # This method fetches the alias of a column within a row of data.
901
+ #
902
+ # ==== Parameters
903
+ # index:: The index of the column to fetch the alias for. The first
904
+ # column in the row is at offset zero.
905
+ #
906
+ def column_alias(index)
907
+ end
908
+
909
+
910
+ #
911
+ # This method fetches the value associated with a column within a Row
912
+ # object.
913
+ #
914
+ # ==== Parameters
915
+ # index:: Either the offset of the column to retrieve the value of or
916
+ # the alias of the column to retrieve the value of (column alias
917
+ # comparisons are case sensitive).
918
+ #
919
+ def [](index)
920
+ end
921
+
922
+
923
+ #
924
+ # This method iterates over the contents of a Row object. The block
925
+ # specified for the method should accept two parameters; one for the
926
+ # column alias and one for the column value.
927
+ #
928
+ def each
929
+ yield column, vlaue
930
+ end
931
+
932
+
933
+ #
934
+ # This method iterates over the column names for a Row class.
935
+ #
936
+ def each_key
937
+ yield column
938
+ end
939
+
940
+
941
+ #
942
+ # This method iterators over the column values for a Row class.
943
+ #
944
+ def each_value
945
+ yield value
946
+ end
947
+
948
+
949
+ #
950
+ # An implementation of the Hash#fetch method for the Row class. The
951
+ # method accepts a block but this should not be specified if a value
952
+ # for the alternative parameter is specified.
953
+ #
954
+ # ==== Parameters
955
+ # key:: A string containing the column alias to retrieve.
956
+ # alternative:: A reference to the alternative value to be returned if
957
+ # the keyed value is not found. Defaults to nil.
958
+ #
959
+ def fetch(key, alternative=nil)
960
+ yield key
961
+ end
962
+
963
+
964
+ #
965
+ # This method is used to determine whether a Row object contains a given
966
+ # column alias.
967
+ #
968
+ # ==== Parameters
969
+ # name:: A String containing the column name to check for.
970
+ #
971
+ def has_key?(name)
972
+ end
973
+
974
+
975
+ #
976
+ # This method is used to determine whether a Row object contains a given
977
+ # column name.
978
+ #
979
+ # ==== Parameters
980
+ # name:: A String containing the column name to check for.
981
+ #
982
+ def has_column?(name)
983
+ end
984
+
985
+
986
+ #
987
+ # This method is used to determine whether a Row object contains a given
988
+ # column alias.
989
+ #
990
+ # ==== Parameters
991
+ # name:: A String containing the column alias to check for.
992
+ #
993
+ def has_alias?(name)
994
+ end
995
+
996
+
997
+ #
998
+ # This method is used to determine whether a Row object contains a given
999
+ # column value.
1000
+ #
1001
+ # ==== Parameters
1002
+ # value:: A reference to an object value to be checked for.
1003
+ #
1004
+ def has_value?(value)
1005
+ end
1006
+
1007
+
1008
+ #
1009
+ # This method retrieves an array of column aliases for a Row object.
1010
+ #
1011
+ def keys
1012
+ end
1013
+
1014
+
1015
+ #
1016
+ # This method retrieves an array of column names for a Row object.
1017
+ #
1018
+ def names
1019
+ end
1020
+
1021
+
1022
+ #
1023
+ # This method retrieves an array of column aliases for a Row object.
1024
+ #
1025
+ def aliases
1026
+ end
1027
+
1028
+
1029
+ #
1030
+ # This method retrieves an array of column values for a Row object.
1031
+ #
1032
+ def values
1033
+ end
1034
+
1035
+
1036
+ #
1037
+ # This method returns an array of the Row elements for which the specified
1038
+ # block returns true.
1039
+ #
1040
+ def select
1041
+ yield column, value
1042
+ end
1043
+
1044
+
1045
+ #
1046
+ # This method retrieves an Array containing the values from a Row object.
1047
+ # Each value is represented as an Array containing a column name and the
1048
+ # associated column value.
1049
+ #
1050
+ def to_a
1051
+ end
1052
+
1053
+
1054
+ #
1055
+ # This method retrieves a Hash created from a Row objects values. The Row
1056
+ # objects column names will be used as a key on to the column values.
1057
+ #
1058
+ def to_hash
1059
+ end
1060
+
1061
+
1062
+ #
1063
+ # This method returns an array of column values based on a list of column
1064
+ # aliases.
1065
+ #
1066
+ # ==== Parameters
1067
+ # names:: One or more Strings containing the names of the columns to
1068
+ # retrieve values for.
1069
+ #
1070
+ def values_at(*names)
1071
+ end
1072
+
1073
+ #
1074
+ # This method retrieves the base SQL type for a column of data within a
1075
+ # Row object. The method returns one of the base types defined in the
1076
+ # SQLType class but does not return an actual SQLType object.
1077
+ #
1078
+ # ==== Parameters
1079
+ # index:: The offset from the Row first column of the column to return
1080
+ # the type information for.
1081
+ #
1082
+ def get_base_type(index)
1083
+ end
1084
+ end
1085
+
1086
+ #
1087
+ # This class represents Blob data fetched from the database. The class defers
1088
+ # the actual loading of the blob until requested. The class is somewhat basic
1089
+ # and maybe expanded upon in later releases.
1090
+ #
1091
+ class Blob
1092
+ #
1093
+ # This is the constructor for the Blob class. This shouldn't really be
1094
+ # used outside of the IBRuby library.
1095
+ #
1096
+ def initialize
1097
+ end
1098
+
1099
+
1100
+ #
1101
+ # This method loads the entire data set for a blob as a string.
1102
+ #
1103
+ def to_s
1104
+ end
1105
+
1106
+
1107
+ #
1108
+ # This method closes a blob, freeing any resources associated with it.
1109
+ #
1110
+ def close
1111
+ end
1112
+
1113
+
1114
+ #
1115
+ # This method loads the segments of a blob one after another. The blob
1116
+ # segments are passed as strings to the block passed to the method.
1117
+ #
1118
+ def each
1119
+ yield segment
1120
+ end
1121
+ end
1122
+
1123
+
1124
+ #
1125
+ # This class represents a InterBase generator entity.
1126
+ #
1127
+ class Generator
1128
+ #
1129
+ # This is the constructor for the Generator class. Note, this method
1130
+ # assumes that the named generator already exists. If it doesn't then
1131
+ # the object will be constructed but will fail during use.
1132
+ #
1133
+ # ==== Parameters
1134
+ # name:: A string containing the generator name.
1135
+ # connection:: A reference to the Connection object that will be used
1136
+ # to access the generator.
1137
+ #
1138
+ def initialize(name, connection)
1139
+ end
1140
+
1141
+
1142
+ #
1143
+ # This is the accessor for the name attribute.
1144
+ #
1145
+ def name
1146
+ end
1147
+
1148
+
1149
+ #
1150
+ # This is the accessor for the connection attribute.
1151
+ #
1152
+ def connection
1153
+ end
1154
+
1155
+
1156
+ #
1157
+ # This method fetches the last value generator from a generator.
1158
+ #
1159
+ # ==== Exceptions
1160
+ # Exception:: Generated whenever a problem occurs accessing the
1161
+ # database generator.
1162
+ #
1163
+ def last
1164
+ end
1165
+
1166
+
1167
+ #
1168
+ # This method drops a generator from the database. After a successful
1169
+ # call to this method the Generator object may not be used to obtain
1170
+ # values unless it is recreated.
1171
+ #
1172
+ # ==== Exceptions
1173
+ # Exception:: Generated whenever a problem occurs dropping the generator
1174
+ # from the database.
1175
+ #
1176
+ def drop
1177
+ end
1178
+
1179
+
1180
+ #
1181
+ # This method fetches the next value, depending on a specified increment,
1182
+ # from a generator.
1183
+ #
1184
+ # ==== Parameters
1185
+ # step:: The step interval to be applied to the generator to obtain the
1186
+ # next value.
1187
+ #
1188
+ # ==== Exceptions
1189
+ # Exception:: Generated whenever a problem occurs accessing the
1190
+ # database generator.
1191
+ #
1192
+ def next(step)
1193
+ end
1194
+
1195
+
1196
+ #
1197
+ # This method is used to determine whether a named generator exists
1198
+ # within a database.
1199
+ #
1200
+ # ==== Parameters
1201
+ # name:: A string containing the generator name to check for.
1202
+ # connection:: A reference to the Connection object to be used in
1203
+ # performing the check.
1204
+ #
1205
+ # ==== Exceptions
1206
+ # Exception:: Generated whenever a problem occurs determining the
1207
+ # existence of the generator.
1208
+ #
1209
+ def Generator.exists?(name, connection)
1210
+ end
1211
+
1212
+
1213
+ #
1214
+ # This method creates a new generator within a database. This method
1215
+ # returns a Generator object is successful.
1216
+ #
1217
+ # ==== Parameters
1218
+ # name:: A string containing the name for the new generator.
1219
+ # connection:: A reference to the Connection object that will be used to
1220
+ # create the generator.
1221
+ #
1222
+ # ==== Exceptions
1223
+ # Exception:: Generated whenever a problem occurs creating the new
1224
+ # generator in the database.
1225
+ #
1226
+ def Generator.create(name, connection)
1227
+ end
1228
+ end
1229
+
1230
+
1231
+ #
1232
+ # This class represents a connection to the service manager for a InterBase
1233
+ # database server instance.
1234
+ #
1235
+ class ServiceManager
1236
+ #
1237
+ # This is the constructor for the ServiceManager class.
1238
+ #
1239
+ # ==== Parameters
1240
+ # host:: The name of the host supporting the service manager to be
1241
+ # connected with.
1242
+ #
1243
+ def initialize(host)
1244
+ end
1245
+
1246
+
1247
+ #
1248
+ # This method attaches a ServiceManager object to its host service. The
1249
+ # user name used to connect with can affect which services can be accessed
1250
+ # on the server.
1251
+ #
1252
+ # ==== Parameters
1253
+ # user:: A string containing the user name to connect with.
1254
+ # password:: A string containing the user password to connect with.
1255
+ #
1256
+ def connect(user, password)
1257
+ end
1258
+
1259
+
1260
+ #
1261
+ # This method disconnects a previously connected ServiceManager object.
1262
+ #
1263
+ def disconnect
1264
+ end
1265
+
1266
+
1267
+ #
1268
+ # This method is used to determine whether a ServiceManager object has
1269
+ # been connected.
1270
+ #
1271
+ def connected?
1272
+ end
1273
+
1274
+
1275
+ #
1276
+ # This method is used to batch execute a collection of task objects.
1277
+ #
1278
+ # ==== Parameters
1279
+ # tasks:: One or more task objects to be executed by the service manager.
1280
+ #
1281
+ # ==== Exceptions
1282
+ # IBRubyException:: Generated whenever this method is called on a
1283
+ # disconnected service manager or is a problem
1284
+ # occurs executing one of the tasks.
1285
+ #
1286
+ def execute(*tasks)
1287
+ end
1288
+ end
1289
+
1290
+
1291
+ #
1292
+ # This class represents a service manager task to add a new user to a
1293
+ # database instance. NOTE: This class does not currently work on the
1294
+ # Mac OS X platform.
1295
+ #
1296
+ class AddUser
1297
+ # Attribute accessor.
1298
+ attr_reader :user_name, :password, :first_name, :middle_name, :last_name
1299
+
1300
+ # Attribute mutator.
1301
+ attr_writer :user_name, :password, :first_name, :middle_name, :last_name
1302
+
1303
+ #
1304
+ # This is a constructor for the AddUser class.
1305
+ #
1306
+ # ==== Parameters
1307
+ # user_name:: A String containing the user name to be assigned to the
1308
+ # new user.
1309
+ # password:: A String containing the password to be assigned to the
1310
+ # new user.
1311
+ # first_name:: A String containing the first name to be associated with
1312
+ # the new user. Defaults to nil.
1313
+ # middle_name:: A String containing the middle name to be associated
1314
+ # with the new user. Defaults to nil.
1315
+ # last_name:: A String containing the last name to be associated with
1316
+ # the new user. Defaults to nil.
1317
+ #
1318
+ def initialize(user_name, password, firsts_name=nil, middle_name=nil,
1319
+ last_name=nil)
1320
+ end
1321
+
1322
+
1323
+ #
1324
+ # This method executes the add user task against a service manager.
1325
+ #
1326
+ # ==== Parameters
1327
+ # manager:: A reference to the ServiceManager object to execute the task
1328
+ # on.
1329
+ #
1330
+ # ==== Exceptions
1331
+ # IBRubyException:: Generated whenever a disconnected service manager
1332
+ # is specified or an error occurs executing the
1333
+ # task.
1334
+ #
1335
+ def execute(manager)
1336
+ end
1337
+ end
1338
+
1339
+
1340
+ #
1341
+ # This class represents a service manager task to remove an existing user
1342
+ # from a database instance. NOTE: This class does not currently work on the
1343
+ # Mac OS X platform.
1344
+ #
1345
+ class RemoveUser
1346
+ # Attribute accessor.
1347
+ attr_reader :user_name
1348
+
1349
+ # Attribute mutator.
1350
+ attr_writer :user_name
1351
+
1352
+ #
1353
+ # This is a constructor for the RemoveUser class.
1354
+ #
1355
+ # ==== Parameters
1356
+ # user_name:: A String containing the user name to be assigned to the
1357
+ # new user.
1358
+ #
1359
+ def initialize(user_name)
1360
+ end
1361
+
1362
+
1363
+ #
1364
+ # This method executes the remove user task against a service manager.
1365
+ #
1366
+ # ==== Parameters
1367
+ # manager:: A reference to the ServiceManager object to execute the task
1368
+ # on.
1369
+ #
1370
+ # ==== Exceptions
1371
+ # IBRubyException:: Generated whenever a disconnected service manager
1372
+ # is specified or an error occurs executing the
1373
+ # task.
1374
+ #
1375
+ def execute(manager)
1376
+ end
1377
+ end
1378
+
1379
+
1380
+ #
1381
+ # This class represents a service manager task to backup an existing database
1382
+ # on the InterBase server. NOTE: This class does not currently work on the
1383
+ # Mac OS X platform.
1384
+ #
1385
+ class Backup
1386
+ # Attribute accessor.
1387
+ attr_reader :backup_file, :database
1388
+
1389
+ # Attribute mutator.
1390
+ attr_writer :backup_file, :database
1391
+
1392
+ #
1393
+ # This is the constructor for the Backup class.
1394
+ #
1395
+ # ==== Parameters
1396
+ # database:: A String or File giving the path and name (relative to the
1397
+ # database server) of the main database file for the database
1398
+ # to be backed up.
1399
+ # file:: A String or File giving the path and name (relative to the
1400
+ # database server) of the back up file to be generated.
1401
+ #
1402
+ def initialize(database, file)
1403
+ end
1404
+
1405
+
1406
+ #
1407
+ # This method fetches the blocking factor to be used in generating the
1408
+ # back up. This will return nil until it has been explicitly set.
1409
+ #
1410
+ def blocking_factor
1411
+ end
1412
+
1413
+
1414
+ #
1415
+ # This method sets the blocking factor to be used in generating the
1416
+ # back up.
1417
+ #
1418
+ # ==== Parameters
1419
+ # size:: A reference to an integer containing the new back up blocking
1420
+ # factor setting.
1421
+ #
1422
+ def blocking_factor=(size)
1423
+ end
1424
+
1425
+
1426
+ #
1427
+ # This method fetches the ignore checksums setting for a Backup object.
1428
+ #
1429
+ def ignore_checksums
1430
+ end
1431
+
1432
+
1433
+ #
1434
+ # This method is used to set the indicator for whether checksum values
1435
+ # should be ignored in performing a backup.
1436
+ #
1437
+ # ==== Parameters
1438
+ # setting:: True to ignore checksums, false otherwise.
1439
+ #
1440
+ def ignore_checksums=(setting)
1441
+ end
1442
+
1443
+
1444
+ #
1445
+ # This method fetches the ignore limbo setting for a Backup object.
1446
+ #
1447
+ def ignore_limbo
1448
+ end
1449
+
1450
+
1451
+ #
1452
+ # This method is used to set the indicator for whether limbo transactions
1453
+ # should be ignored in performing a backup.
1454
+ #
1455
+ # ==== Parameters
1456
+ # setting:: True to ignore limbo transactions, false otherwise.
1457
+ #
1458
+ def ignore_limbo=(setting)
1459
+ end
1460
+
1461
+
1462
+ #
1463
+ # This method fetches the metadata only setting for a Backup object.
1464
+ #
1465
+ def metadata_only
1466
+ end
1467
+
1468
+
1469
+ #
1470
+ # This method is used to set the indicator for whether a backup stores
1471
+ # only the database metadata.
1472
+ #
1473
+ # ==== Parameters
1474
+ # setting:: True to store only metadata, false otherwise.
1475
+ #
1476
+ def metadata_only=(setting)
1477
+ end
1478
+
1479
+
1480
+ #
1481
+ # This method fetches the garbage collect setting for a Backup object.
1482
+ #
1483
+ def garbage_collect
1484
+ end
1485
+
1486
+
1487
+ #
1488
+ # This method is used to set the indicator for whether the backup will
1489
+ # undertake garbage collection.
1490
+ #
1491
+ # ==== Parameters
1492
+ # setting:: True to perform garbage collection, false otherwise.
1493
+ #
1494
+ def garbage_collect=(setting)
1495
+ end
1496
+
1497
+
1498
+ #
1499
+ # This method fetches the non-transportable setting for a Backup object.
1500
+ #
1501
+ def non_transportable
1502
+ end
1503
+
1504
+
1505
+ #
1506
+ # This method is used to set the indicator for whether backup generated
1507
+ # by the task will be platform specific.
1508
+ #
1509
+ # ==== Parameters
1510
+ # setting:: True to generate a platform specific backup, false otherwise.
1511
+ #
1512
+ def non_transportable=(setting)
1513
+ end
1514
+
1515
+
1516
+ #
1517
+ # This method fetches the convert tables setting for a Backup object.
1518
+ #
1519
+ def convert_tables
1520
+ end
1521
+
1522
+
1523
+ #
1524
+ # This method is used to set the indicator for whether external tables
1525
+ # will be converted to internal tables as part of the backup.
1526
+ #
1527
+ # ==== Parameters
1528
+ # setting:: True to convert external tables, false otherwise.
1529
+ #
1530
+ def convert_tables=(setting)
1531
+ end
1532
+
1533
+
1534
+ #
1535
+ # This method is used to execute a backup task against a service manager.
1536
+ #
1537
+ # ==== Parameters
1538
+ # manager:: A reference to the service manager to execute the backup
1539
+ # task against.
1540
+ #
1541
+ # ==== Exceptions
1542
+ # IBRubyException:: Generated whenever a disconnected service manager
1543
+ # is specified or a problem occurs executing the
1544
+ # task.
1545
+ #
1546
+ def execute(manager)
1547
+ end
1548
+
1549
+
1550
+ #
1551
+ # This method fetches the log value for a Backup task. This value will
1552
+ # always be nil until the task has been executed. After a successful
1553
+ # execution the log value should contain output from the backup task
1554
+ # generated on the server.
1555
+ #
1556
+ def log
1557
+ end
1558
+ end
1559
+
1560
+
1561
+ #
1562
+ # This class represents a service manager task to restore a previously
1563
+ # created database backup on the InterBase server. NOTE: This class does not
1564
+ # currently work on the Mac OS X platform.
1565
+ #
1566
+ class Restore
1567
+ # Attribute accessor.
1568
+ attr_reader :backup_file, :database
1569
+
1570
+ # Attribute mutator.
1571
+ attr_writer :backup_file, :database
1572
+
1573
+ # Access mode constant definition.
1574
+ ACCESS_READ_ONLY = 39
1575
+
1576
+ # Access mode constant definition.
1577
+ ACCESS_READ_WRITE = 40
1578
+
1579
+ # Restore mode constant definition.
1580
+ MODE_CREATE = 0x1000
1581
+
1582
+ # Restore mode constant definition.
1583
+ MODE_REPLACE = 0x2000
1584
+
1585
+ #
1586
+ # This is the constructor for the Restore class.
1587
+ #
1588
+ # ==== Parameters
1589
+ # file:: A String or File containing the path and name (relative to
1590
+ # the server) of the backup file to be used in the restore.
1591
+ # database:: A String or File containing the path and name (relative to
1592
+ # the server) of the database file to be restored.
1593
+ #
1594
+ def initialize(file, database)
1595
+ end
1596
+
1597
+
1598
+ #
1599
+ # This method retrieves the cache buffers setting for a Restore object.
1600
+ # This will be nil until a value is actual set.
1601
+ #
1602
+ def cache_buffers
1603
+ end
1604
+
1605
+
1606
+ #
1607
+ # This method updates the cache buffers setting for a Restore object.
1608
+ #
1609
+ # ==== Parameters
1610
+ # setting:: The new value for the object setting. Should be an integer.
1611
+ #
1612
+ def cache_buffers=(setting)
1613
+ end
1614
+
1615
+
1616
+ #
1617
+ # This method retrieves the page size setting for a Restore object.
1618
+ # This will be nil until a value is actual set.
1619
+ #
1620
+ def page_size
1621
+ end
1622
+
1623
+
1624
+ #
1625
+ # This method updates the page size setting for a Restore object.
1626
+ #
1627
+ # ==== Parameters
1628
+ # setting:: The new value for the object setting. Should be an integer.
1629
+ #
1630
+ def page_size=(setting)
1631
+ end
1632
+
1633
+
1634
+ #
1635
+ # This method retrieves the access mode setting for a Restore object.
1636
+ # This will be nil until a value is actual set.
1637
+ #
1638
+ def access_mode
1639
+ end
1640
+
1641
+
1642
+ #
1643
+ # This method updates the access mode setting for a Restore object.
1644
+ #
1645
+ # ==== Parameters
1646
+ # setting:: The new value for the object setting. This should be one
1647
+ # of Restore::ACCESS_READ_ONLY or Restore::ACCESS_READ_WRITE.
1648
+ #
1649
+ def access_mode=(setting)
1650
+ end
1651
+
1652
+
1653
+ #
1654
+ # This method retrieves the build indices setting for a Restore object.
1655
+ #
1656
+ def build_indices
1657
+ end
1658
+
1659
+
1660
+ #
1661
+ # This method updates the build indices setting for a Restore object.
1662
+ # This value affects whether the various indexes for a database are
1663
+ # restored with the restore task.
1664
+ #
1665
+ # ==== Parameters
1666
+ # setting:: True to rebuild the database indices, false otherwise.
1667
+ #
1668
+ def build_indices=(setting)
1669
+ end
1670
+
1671
+
1672
+ #
1673
+ # This method retrieves the no shadows setting for a Restore object.
1674
+ #
1675
+ def no_shadows
1676
+ end
1677
+
1678
+
1679
+ #
1680
+ # This method updates the no shadows setting for a Restore object.
1681
+ # This value affects whether shadow databases are recreated as part of a
1682
+ # restore.
1683
+ #
1684
+ # ==== Parameters
1685
+ # setting:: True to recreate shadow files, false otherwise.
1686
+ #
1687
+ def no_shadows=(setting)
1688
+ end
1689
+
1690
+
1691
+ #
1692
+ # This method retrieves the validity checks setting for a Restore object.
1693
+ #
1694
+ def check_validity
1695
+ end
1696
+
1697
+
1698
+ #
1699
+ # This method updates the validity checks setting for a Restore object.
1700
+ # This value affects whether the restore performs validity checks on the
1701
+ # database as it is restored.
1702
+ #
1703
+ # ==== Parameters
1704
+ # setting:: True to perform validity checks, false otherwise.
1705
+ #
1706
+ def check_validity=(setting)
1707
+ end
1708
+
1709
+
1710
+ #
1711
+ # This method retrieves the commit tables setting for a Restore object.
1712
+ #
1713
+ def commit_tables
1714
+ end
1715
+
1716
+
1717
+ #
1718
+ # This method updates the commit tables setting for a Restore object.
1719
+ # This value affects whether the restore commits tables as they are
1720
+ # restored.
1721
+ #
1722
+ # ==== Parameters
1723
+ # setting:: True to commit tables as they are restored, false otherwise.
1724
+ #
1725
+ def commit_tables=(setting)
1726
+ end
1727
+
1728
+
1729
+ #
1730
+ # This method retrieves the restore mode setting for a Restore object.
1731
+ #
1732
+ def restore_mode
1733
+ end
1734
+
1735
+
1736
+ #
1737
+ # This method updates the restore mode setting for a Restore object.
1738
+ # This value affects whether the restore will overwrite an existing
1739
+ # database.
1740
+ #
1741
+ # ==== Parameters
1742
+ # setting:: Either Restore::MODE_CREATE (default) or
1743
+ # Restore::MODE_REPLACE.
1744
+ #
1745
+ def restore_mode=(setting)
1746
+ end
1747
+
1748
+
1749
+ #
1750
+ # This method retrieves the use all space setting for a Restore object.
1751
+ #
1752
+ def use_all_space
1753
+ end
1754
+
1755
+
1756
+ #
1757
+ # This method updates the use all space setting for a Restore object.
1758
+ # This value affects whether restore leaves space within the database
1759
+ # file for expansion. This can be switched on for read only databases.
1760
+ #
1761
+ # ==== Parameters
1762
+ # setting:: True leave no default expansion space within the restored
1763
+ # database file, false otherwise.
1764
+ #
1765
+ def use_all_space=(setting)
1766
+ end
1767
+
1768
+
1769
+ #
1770
+ # This method is used to execute a restore task against a service manager.
1771
+ #
1772
+ # ==== Parameters
1773
+ # manager:: A reference to the service manager to execute the restore
1774
+ # task against.
1775
+ #
1776
+ # ==== Exceptions
1777
+ # IBRubyException:: Generated whenever a disconnected service manager
1778
+ # is specified or a problem occurs executing the
1779
+ # task.
1780
+ #
1781
+ def execute(manager)
1782
+ end
1783
+
1784
+
1785
+ #
1786
+ # This method fetches the log value for a Restore task. This value will
1787
+ # always be nil until the task has been executed. After a successful
1788
+ # execution the log value should contain output from the restore task
1789
+ # generated on the server.
1790
+ #
1791
+ def log
1792
+ end
1793
+ end
1794
+ end