-
Notifications
You must be signed in to change notification settings - Fork 0
/
uPSI_IBX.pas
2153 lines (1835 loc) · 99.8 KB
/
uPSI_IBX.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
unit uPSI_IBX;
{
This file has been generated by UnitParser v0.4, written by M. Knight.
Source Code from Carlo Kok has been used to implement various sections of
UnitParser. Components of ifps3 are used in the construction of UnitParser,
code implementing the class wrapper is taken from Carlo Kok''s conv unility
}
interface
uses
SysUtils, Classes, uPSComponent, uPSCompiler, uPSRuntime;
type
TPSImport_IBX = class(TPSPlugin)
protected
procedure CompOnUses(CompExec: TPSScript); override;
procedure ExecOnUses(CompExec: TPSScript); override;
procedure CompileImport1(CompExec: TPSScript); override;
procedure CompileImport2(CompExec: TPSScript); override;
procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
procedure ExecImport2(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
end;
implementation
uses
WINDOWS
,CONTROLS
,IBEXTERNALS
,IB
,IBDatabase
,IBHEADER
,STDVCL
,IBSQL
,DB
,IBUTILS
,IBBLOB
,IBCustomDataSet
,IBTable
,IBQuery
;
(* === compile-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure SIRegister_TIBDATASET(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TIBCUSTOMDATASET', 'TIBDATASET') do
with CL.AddClassN(CL.FindClass('TIBCUSTOMDATASET'),'TIBDATASET') do
begin
RegisterMethod('Procedure PREPARE');
RegisterMethod('Procedure UNPREPARE');
RegisterMethod('Procedure BATCHINPUT( INPUTOBJECT : TIBBATCHINPUT)');
RegisterMethod('Procedure BATCHOUTPUT( OUTPUTOBJECT : TIBBATCHOUTPUT)');
RegisterMethod('Procedure EXECSQL');
RegisterMethod('Function PARAMBYNAME( IDX : STRING) : TIBXSQLVAR');
RegisterProperty('PREPARED', 'BOOLEAN', iptr);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TIBCUSTOMDATASET(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TDATASET', 'TIBCUSTOMDATASET') do
with CL.AddClassN(CL.FindClass('TDATASET'),'TIBCUSTOMDATASET') do
begin
RegisterMethod('Procedure APPLYUPDATES');
RegisterMethod('Function CACHEDUPDATESTATUS : TCACHEDUPDATESTATUS');
RegisterMethod('Procedure CANCELUPDATES');
RegisterMethod('Procedure FETCHALL');
RegisterMethod('Function LOCATENEXT( const KEYFIELDS : STRING; const KEYVALUES : VARIANT; OPTIONS : TLOCATEOPTIONS) : BOOLEAN');
// RegisterMethod('Function LOCATE( const KEYFIELDS : STRING; const KEYVALUES : VARIANT; OPTIONS : TLOCATEOPTIONS) : BOOLEAN');
RegisterMethod('Procedure RECORDMODIFIED( VALUE : BOOLEAN)');
RegisterMethod('Procedure REVERTRECORD');
RegisterMethod('Procedure UNDELETE');
RegisterMethod('Function CURRENT : TIBXSQLDA');
RegisterMethod('Function SQLTYPE : TIBSQLTYPES');
RegisterProperty('DBHANDLE', 'PISC_DB_HANDLE', iptr);
RegisterProperty('TRHANDLE', 'PISC_TR_HANDLE', iptr);
RegisterProperty('UPDATEOBJECT', 'TIBDATASETUPDATEOBJECT', iptrw);
RegisterProperty('UPDATESPENDING', 'BOOLEAN', iptr);
RegisterProperty('UPDATERECORDTYPES', 'TIBUPDATERECORDTYPES', iptrw);
RegisterProperty('ROWSAFFECTED', 'INTEGER', iptr);
RegisterProperty('PLAN', 'STRING', iptr);
RegisterProperty('DATABASE', 'TIBDATABASE', iptrw);
RegisterProperty('TRANSACTION', 'TIBTRANSACTION', iptrw);
RegisterProperty('FORCEDREFRESH', 'BOOLEAN', iptrw);
RegisterProperty('ONUPDATEERROR', 'TIBUPDATEERROREVENT', iptrw);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TIBGENERATORFIELD(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TPERSISTENT', 'TIBGENERATORFIELD') do
with CL.AddClassN(CL.FindClass('TPERSISTENT'),'TIBGENERATORFIELD') do
begin
RegisterMethod('Constructor CREATE( ADATASET : TIBCUSTOMDATASET)');
RegisterMethod('Function VALUENAME : STRING');
RegisterMethod('Procedure APPLY');
RegisterProperty('FIELD', 'STRING', iptrw);
RegisterProperty('GENERATOR', 'STRING', iptrw);
RegisterProperty('INCREMENTBY', 'INTEGER', iptrw);
RegisterProperty('APPLYEVENT', 'TIBGENERATORAPPLYEVENT', iptrw);
end;
end;
(* === compile-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure SIRegister_TIBBASE(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TOBJECT', 'TIBBASE') do
with CL.AddClassN(CL.FindClass('TOBJECT'),'TIBBASE') do
begin
RegisterMethod('Constructor CREATE( AOWNER : TOBJECT)');
RegisterMethod('Procedure CHECKDATABASE');
RegisterMethod('Procedure CHECKTRANSACTION');
RegisterProperty('BEFOREDATABASEDISCONNECT', 'TNOTIFYEVENT', iptrw);
RegisterProperty('AFTERDATABASEDISCONNECT', 'TNOTIFYEVENT', iptrw);
RegisterProperty('ONDATABASEFREE', 'TNOTIFYEVENT', iptrw);
RegisterProperty('BEFORETRANSACTIONEND', 'TNOTIFYEVENT', iptrw);
RegisterProperty('AFTERTRANSACTIONEND', 'TNOTIFYEVENT', iptrw);
RegisterProperty('ONTRANSACTIONFREE', 'TNOTIFYEVENT', iptrw);
RegisterProperty('DATABASE', 'TIBDATABASE', iptrw);
RegisterProperty('DBHANDLE', 'PISC_DB_HANDLE', iptr);
RegisterProperty('OWNER', 'TOBJECT', iptr);
RegisterProperty('TRHANDLE', 'PISC_TR_HANDLE', iptr);
RegisterProperty('TRANSACTION', 'TIBTRANSACTION', iptrw);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TIBTRANSACTION(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCOMPONENT', 'TIBTRANSACTION') do
with CL.AddClassN(CL.FindClass('TCOMPONENT'),'TIBTRANSACTION') do
begin
RegisterMethod('Function CALL( ERRCODE : ISC_STATUS; RAISEERROR : BOOLEAN) : ISC_STATUS');
RegisterMethod('Procedure COMMIT');
RegisterMethod('Procedure COMMITRETAINING');
RegisterMethod('Procedure ROLLBACK');
RegisterMethod('Procedure ROLLBACKRETAINING');
RegisterMethod('Procedure STARTTRANSACTION');
RegisterMethod('Procedure CHECKINTRANSACTION');
RegisterMethod('Procedure CHECKNOTINTRANSACTION');
RegisterMethod('Procedure CHECKAUTOSTOP');
RegisterMethod('Function ADDDATABASE( DB : TIBDATABASE) : INTEGER');
RegisterMethod('Function FINDDATABASE( DB : TIBDATABASE) : INTEGER');
RegisterMethod('Function FINDDEFAULTDATABASE : TIBDATABASE');
RegisterMethod('Procedure REMOVEDATABASE( IDX : INTEGER)');
RegisterMethod('Procedure REMOVEDATABASES');
RegisterMethod('Procedure CHECKDATABASESINLIST');
RegisterProperty('DATABASECOUNT', 'INTEGER', iptr);
RegisterProperty('DATABASES', 'TIBDATABASE INTEGER', iptr);
RegisterProperty('SQLOBJECTCOUNT', 'INTEGER', iptr);
RegisterProperty('SQLOBJECTS', 'TIBBASE INTEGER', iptr);
RegisterProperty('HANDLE', 'TISC_TR_HANDLE', iptr);
RegisterProperty('HANDLEISSHARED', 'BOOLEAN', iptr);
RegisterProperty('INTRANSACTION', 'BOOLEAN', iptr);
RegisterProperty('TPB', 'PCHAR', iptr);
RegisterProperty('TPBLENGTH', 'SHORT', iptr);
RegisterProperty('ACTIVE', 'BOOLEAN', iptrw);
RegisterProperty('DEFAULTDATABASE', 'TIBDATABASE', iptrw);
RegisterProperty('IDLETIMER', 'INTEGER', iptrw);
RegisterProperty('DEFAULTACTION', 'TTRANSACTIONACTION', iptrw);
RegisterProperty('PARAMS', 'TSTRINGS', iptrw);
RegisterProperty('AUTOSTOPACTION', 'TAUTOSTOPACTION', iptrw);
RegisterProperty('ONIDLETIMER', 'TNOTIFYEVENT', iptrw);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TIBDATABASE(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCUSTOMCONNECTION', 'TIBDATABASE') do
with CL.AddClassN(CL.FindClass('TCUSTOMCONNECTION'),'TIBDATABASE') do
begin
RegisterMethod('Procedure ADDEVENTNOTIFIER( NOTIFIER : IIBEVENTNOTIFIER)');
RegisterMethod('Procedure REMOVEEVENTNOTIFIER( NOTIFIER : IIBEVENTNOTIFIER)');
RegisterMethod('Procedure APPLYUPDATES( const DATASETS : array of TDATASET)');
RegisterMethod('Procedure CLOSEDATASETS');
RegisterMethod('Procedure CHECKACTIVE');
RegisterMethod('Procedure CHECKINACTIVE');
RegisterMethod('Procedure CREATEDATABASE');
RegisterMethod('Procedure DROPDATABASE');
RegisterMethod('Procedure FORCECLOSE');
RegisterMethod('Procedure GETFIELDNAMES( const TABLENAME : STRING; LIST : TSTRINGS)');
RegisterMethod('Procedure GETTABLENAMES( LIST : TSTRINGS; SYSTEMTABLES : BOOLEAN)');
RegisterMethod('Function INDEXOFDBCONST( ST : STRING) : INTEGER');
RegisterMethod('Function TESTCONNECTED : BOOLEAN');
RegisterMethod('Procedure CHECKDATABASENAME');
RegisterMethod('Function CALL( ERRCODE : ISC_STATUS; RAISEERROR : BOOLEAN) : ISC_STATUS');
RegisterMethod('Function ADDTRANSACTION( TR : TIBTRANSACTION) : INTEGER');
RegisterMethod('Function FINDTRANSACTION( TR : TIBTRANSACTION) : INTEGER');
RegisterMethod('Function FINDDEFAULTTRANSACTION( ) : TIBTRANSACTION');
RegisterMethod('Procedure REMOVETRANSACTION( IDX : INTEGER)');
RegisterMethod('Procedure REMOVETRANSACTIONS');
RegisterMethod('Procedure SETHANDLE( VALUE : TISC_DB_HANDLE)');
RegisterMethod('procedure Open');
RegisterMethod('procedure Close');
RegisterProperty('Connected','BOOLEAN',iptrw);
RegisterProperty('HANDLE', 'TISC_DB_HANDLE', iptr);
RegisterProperty('ISREADONLY', 'BOOLEAN', iptr);
RegisterProperty('DBPARAMBYDPB', 'STRING INTEGER', iptrw);
RegisterProperty('SQLOBJECTCOUNT', 'INTEGER', iptr);
RegisterProperty('SQLOBJECTS', 'TIBBASE INTEGER', iptr);
RegisterProperty('HANDLEISSHARED', 'BOOLEAN', iptr);
RegisterProperty('TRANSACTIONCOUNT', 'INTEGER', iptr);
RegisterProperty('TRANSACTIONS', 'TIBTRANSACTION INTEGER', iptr);
RegisterProperty('INTERNALTRANSACTION', 'TIBTRANSACTION', iptr);
RegisterMethod('Function HAS_DEFAULT_VALUE( RELATION, FIELD : STRING) : BOOLEAN');
RegisterMethod('Function HAS_COMPUTED_BLR( RELATION, FIELD : STRING) : BOOLEAN');
RegisterMethod('Procedure FLUSHSCHEMA');
RegisterProperty('DATABASENAME', 'TIBFILENAME', iptrw);
RegisterProperty('PARAMS', 'TSTRINGS', iptrw);
RegisterProperty('DEFAULTTRANSACTION', 'TIBTRANSACTION', iptrw);
RegisterProperty('IDLETIMER', 'INTEGER', iptrw);
RegisterProperty('SQLDIALECT', 'INTEGER', iptrw);
RegisterProperty('DBSQLDIALECT', 'INTEGER', iptr);
RegisterProperty('TRACEFLAGS', 'TTRACEFLAGS', iptrw);
RegisterProperty('ALLOWSTREAMEDCONNECTED', 'BOOLEAN', iptrw);
RegisterProperty('ONLOGIN', 'TIBDATABASELOGINEVENT', iptrw);
RegisterProperty('ONIDLETIMER', 'TNOTIFYEVENT', iptrw);
RegisterProperty('ONDIALECTDOWNGRADEWARNING', 'TNOTIFYEVENT', iptrw);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TIBSCHEMA(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TOBJECT', 'TIBSCHEMA') do
with CL.AddClassN(CL.FindClass('TOBJECT'),'TIBSCHEMA') do
begin
RegisterMethod('Procedure FREENODES');
RegisterMethod('Function HAS_DEFAULT_VALUE( RELATION, FIELD : STRING) : BOOLEAN');
RegisterMethod('Function HAS_COMPUTED_BLR( RELATION, FIELD : STRING) : BOOLEAN');
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_IBDatabase(CL: TPSPascalCompiler);
begin
CL.AddClassN(CL.FindClass('TOBJECT'),'TIBDATABASE');
CL.AddClassN(CL.FindClass('TOBJECT'),'TIBTRANSACTION');
CL.AddClassN(CL.FindClass('TOBJECT'),'TIBBASE');
CL.AddTypeS('TIBDATABASELOGINEVENT', 'Procedure ( DATABASE : TIBDATABASE; LOG'
+'INPARAMS : TSTRINGS)');
SIRegister_TIBSCHEMA(CL);
CL.AddTypeS('TIBFILENAME', 'STRING');
SIRegister_TIBDATABASE(CL);
CL.AddTypeS('TTRANSACTIONACTION', '( TAROLLBACK, TACOMMIT, TAROLLBACKRETAININ'
+'G, TACOMMITRETAINING )');
CL.AddTypeS('TAUTOSTOPACTION', '( SANONE, SAROLLBACK, SACOMMIT, SAROLLBACKRET'
+'AINING, SACOMMITRETAINING )');
SIRegister_TIBTRANSACTION(CL);
SIRegister_TIBBASE(CL);
end;
(* === run-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure TIBBASETRANSACTION_W(Self: TIBBASE; const T: TIBTRANSACTION);
begin Self.TRANSACTION := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASETRANSACTION_R(Self: TIBBASE; var T: TIBTRANSACTION);
begin T := Self.TRANSACTION; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASETRHANDLE_R(Self: TIBBASE; var T: PISC_TR_HANDLE);
begin T := Self.TRHANDLE; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEOWNER_R(Self: TIBBASE; var T: TOBJECT);
begin T := Self.OWNER; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEDBHANDLE_R(Self: TIBBASE; var T: PISC_DB_HANDLE);
begin T := Self.DBHANDLE; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEDATABASE_W(Self: TIBBASE; const T: TIBDATABASE);
begin Self.DATABASE := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEDATABASE_R(Self: TIBBASE; var T: TIBDATABASE);
begin T := Self.DATABASE; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEONTRANSACTIONFREE_W(Self: TIBBASE; const T: TNOTIFYEVENT);
begin Self.ONTRANSACTIONFREE := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEONTRANSACTIONFREE_R(Self: TIBBASE; var T: TNOTIFYEVENT);
begin T := Self.ONTRANSACTIONFREE; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEAFTERTRANSACTIONEND_W(Self: TIBBASE; const T: TNOTIFYEVENT);
begin Self.AFTERTRANSACTIONEND := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEAFTERTRANSACTIONEND_R(Self: TIBBASE; var T: TNOTIFYEVENT);
begin T := Self.AFTERTRANSACTIONEND; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEBEFORETRANSACTIONEND_W(Self: TIBBASE; const T: TNOTIFYEVENT);
begin Self.BEFORETRANSACTIONEND := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEBEFORETRANSACTIONEND_R(Self: TIBBASE; var T: TNOTIFYEVENT);
begin T := Self.BEFORETRANSACTIONEND; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEONDATABASEFREE_W(Self: TIBBASE; const T: TNOTIFYEVENT);
begin Self.ONDATABASEFREE := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEONDATABASEFREE_R(Self: TIBBASE; var T: TNOTIFYEVENT);
begin T := Self.ONDATABASEFREE; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEAFTERDATABASEDISCONNECT_W(Self: TIBBASE; const T: TNOTIFYEVENT);
begin Self.AFTERDATABASEDISCONNECT := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEAFTERDATABASEDISCONNECT_R(Self: TIBBASE; var T: TNOTIFYEVENT);
begin T := Self.AFTERDATABASEDISCONNECT; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEBEFOREDATABASEDISCONNECT_W(Self: TIBBASE; const T: TNOTIFYEVENT);
begin Self.BEFOREDATABASEDISCONNECT := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBBASEBEFOREDATABASEDISCONNECT_R(Self: TIBBASE; var T: TNOTIFYEVENT);
begin T := Self.BEFOREDATABASEDISCONNECT; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONONIDLETIMER_W(Self: TIBTRANSACTION; const T: TNOTIFYEVENT);
begin Self.ONIDLETIMER := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONONIDLETIMER_R(Self: TIBTRANSACTION; var T: TNOTIFYEVENT);
begin T := Self.ONIDLETIMER; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONAUTOSTOPACTION_W(Self: TIBTRANSACTION; const T: TAUTOSTOPACTION);
begin Self.AUTOSTOPACTION := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONAUTOSTOPACTION_R(Self: TIBTRANSACTION; var T: TAUTOSTOPACTION);
begin T := Self.AUTOSTOPACTION; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONPARAMS_W(Self: TIBTRANSACTION; const T: TSTRINGS);
begin Self.PARAMS := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONPARAMS_R(Self: TIBTRANSACTION; var T: TSTRINGS);
begin T := Self.PARAMS; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONDEFAULTACTION_W(Self: TIBTRANSACTION; const T: TTRANSACTIONACTION);
begin Self.DEFAULTACTION := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONDEFAULTACTION_R(Self: TIBTRANSACTION; var T: TTRANSACTIONACTION);
begin T := Self.DEFAULTACTION; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONIDLETIMER_W(Self: TIBTRANSACTION; const T: INTEGER);
begin Self.IDLETIMER := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONIDLETIMER_R(Self: TIBTRANSACTION; var T: INTEGER);
begin T := Self.IDLETIMER; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONDEFAULTDATABASE_W(Self: TIBTRANSACTION; const T: TIBDATABASE);
begin Self.DEFAULTDATABASE := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONDEFAULTDATABASE_R(Self: TIBTRANSACTION; var T: TIBDATABASE);
begin T := Self.DEFAULTDATABASE; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONACTIVE_W(Self: TIBTRANSACTION; const T: BOOLEAN);
begin Self.ACTIVE := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONACTIVE_R(Self: TIBTRANSACTION; var T: BOOLEAN);
begin T := Self.ACTIVE; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONTPBLENGTH_R(Self: TIBTRANSACTION; var T: SHORT);
begin T := Self.TPBLENGTH; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONTPB_R(Self: TIBTRANSACTION; var T: PCHAR);
begin T := Self.TPB; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONINTRANSACTION_R(Self: TIBTRANSACTION; var T: BOOLEAN);
begin T := Self.INTRANSACTION; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONHANDLEISSHARED_R(Self: TIBTRANSACTION; var T: BOOLEAN);
begin T := Self.HANDLEISSHARED; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONHANDLE_R(Self: TIBTRANSACTION; var T: TISC_TR_HANDLE);
begin T := Self.HANDLE; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONSQLOBJECTS_R(Self: TIBTRANSACTION; var T: TIBBASE; const t1: INTEGER);
begin T := Self.SQLOBJECTS[t1]; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONSQLOBJECTCOUNT_R(Self: TIBTRANSACTION; var T: INTEGER);
begin T := Self.SQLOBJECTCOUNT; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONDATABASES_R(Self: TIBTRANSACTION; var T: TIBDATABASE; const t1: INTEGER);
begin T := Self.DATABASES[t1]; end;
(*----------------------------------------------------------------------------*)
procedure TIBTRANSACTIONDATABASECOUNT_R(Self: TIBTRANSACTION; var T: INTEGER);
begin T := Self.DATABASECOUNT; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEONDIALECTDOWNGRADEWARNING_W(Self: TIBDATABASE; const T: TNOTIFYEVENT);
begin Self.ONDIALECTDOWNGRADEWARNING := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEONDIALECTDOWNGRADEWARNING_R(Self: TIBDATABASE; var T: TNOTIFYEVENT);
begin T := Self.ONDIALECTDOWNGRADEWARNING; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEONIDLETIMER_W(Self: TIBDATABASE; const T: TNOTIFYEVENT);
begin Self.ONIDLETIMER := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEONIDLETIMER_R(Self: TIBDATABASE; var T: TNOTIFYEVENT);
begin T := Self.ONIDLETIMER; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEONLOGIN_W(Self: TIBDATABASE; const T: TIBDATABASELOGINEVENT);
begin Self.ONLOGIN := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEONLOGIN_R(Self: TIBDATABASE; var T: TIBDATABASELOGINEVENT);
begin T := Self.ONLOGIN; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASECONNECTED_W(Self: TIBDATABASE; const T: Boolean);
begin Self.Connected := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASECONNECTED_R(Self: TIBDATABASE; var T: Boolean);
begin T := Self.Connected; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEALLOWSTREAMEDCONNECTED_W(Self: TIBDATABASE; const T: BOOLEAN);
begin Self.ALLOWSTREAMEDCONNECTED := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEALLOWSTREAMEDCONNECTED_R(Self: TIBDATABASE; var T: BOOLEAN);
begin T := Self.ALLOWSTREAMEDCONNECTED; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASETRACEFLAGS_W(Self: TIBDATABASE; const T: TTRACEFLAGS);
begin Self.TRACEFLAGS := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASETRACEFLAGS_R(Self: TIBDATABASE; var T: TTRACEFLAGS);
begin T := Self.TRACEFLAGS; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEDBSQLDIALECT_R(Self: TIBDATABASE; var T: INTEGER);
begin T := Self.DBSQLDIALECT; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASESQLDIALECT_W(Self: TIBDATABASE; const T: INTEGER);
begin Self.SQLDIALECT := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASESQLDIALECT_R(Self: TIBDATABASE; var T: INTEGER);
begin T := Self.SQLDIALECT; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEIDLETIMER_W(Self: TIBDATABASE; const T: INTEGER);
begin Self.IDLETIMER := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEIDLETIMER_R(Self: TIBDATABASE; var T: INTEGER);
begin T := Self.IDLETIMER; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEDEFAULTTRANSACTION_W(Self: TIBDATABASE; const T: TIBTRANSACTION);
begin Self.DEFAULTTRANSACTION := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEDEFAULTTRANSACTION_R(Self: TIBDATABASE; var T: TIBTRANSACTION);
begin T := Self.DEFAULTTRANSACTION; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEPARAMS_W(Self: TIBDATABASE; const T: TSTRINGS);
begin Self.PARAMS := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEPARAMS_R(Self: TIBDATABASE; var T: TSTRINGS);
begin T := Self.PARAMS; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEDATABASENAME_W(Self: TIBDATABASE; const T: TIBFILENAME);
begin Self.DATABASENAME := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEDATABASENAME_R(Self: TIBDATABASE; var T: TIBFILENAME);
begin T := Self.DATABASENAME; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEINTERNALTRANSACTION_R(Self: TIBDATABASE; var T: TIBTRANSACTION);
begin T := Self.INTERNALTRANSACTION; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASETRANSACTIONS_R(Self: TIBDATABASE; var T: TIBTRANSACTION; const t1: INTEGER);
begin T := Self.TRANSACTIONS[t1]; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASETRANSACTIONCOUNT_R(Self: TIBDATABASE; var T: INTEGER);
begin T := Self.TRANSACTIONCOUNT; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEHANDLEISSHARED_R(Self: TIBDATABASE; var T: BOOLEAN);
begin T := Self.HANDLEISSHARED; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASESQLOBJECTS_R(Self: TIBDATABASE; var T: TIBBASE; const t1: INTEGER);
begin T := Self.SQLOBJECTS[t1]; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASESQLOBJECTCOUNT_R(Self: TIBDATABASE; var T: INTEGER);
begin T := Self.SQLOBJECTCOUNT; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEDBPARAMBYDPB_W(Self: TIBDATABASE; const T: STRING; const t1: INTEGER);
begin Self.DBPARAMBYDPB[t1] := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEDBPARAMBYDPB_R(Self: TIBDATABASE; var T: STRING; const t1: INTEGER);
begin T := Self.DBPARAMBYDPB[t1]; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEISREADONLY_R(Self: TIBDATABASE; var T: BOOLEAN);
begin T := Self.ISREADONLY; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATABASEHANDLE_R(Self: TIBDATABASE; var T: TISC_DB_HANDLE);
begin T := Self.HANDLE; end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TIBDATALINK(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TDETAILDATALINK', 'TIBDATALINK') do
with CL.AddClassN(CL.FindClass('TDETAILDATALINK'),'TIBDATALINK') do
begin
RegisterMethod('Constructor CREATE( ADATASET : TIBCUSTOMDATASET)');
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TIBBCDFIELD(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TBCDFIELD', 'TIBBCDFIELD') do
with CL.AddClassN(CL.FindClass('TBCDFIELD'),'TIBBCDFIELD') do
begin
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TIBSTRINGFIELD(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TSTRINGFIELD', 'TIBSTRINGFIELD') do
with CL.AddClassN(CL.FindClass('TSTRINGFIELD'),'TIBSTRINGFIELD') do
begin
RegisterMethod('Function GETVALUE( var VALUE : STRING) : BOOLEAN');
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_TIBDATASETUPDATEOBJECT(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TCOMPONENT', 'TIBDATASETUPDATEOBJECT') do
with CL.AddClassN(CL.FindClass('TCOMPONENT'),'TIBDATASETUPDATEOBJECT') do
begin
RegisterProperty('REFRESHSQL', 'TSTRINGS', iptrw);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_IBCustomDataSet(CL: TPSPascalCompiler);
begin
CL.AddConstantN('BUFFERCACHESIZE','LONGINT').SetInt( 1000);
CL.AddConstantN('UNICACHE','LONGINT').SetInt( 2);
CL.AddClassN(CL.FindClass('TOBJECT'),'TIBCUSTOMDATASET');
CL.AddClassN(CL.FindClass('TOBJECT'),'TIBDATASET');
SIRegister_TIBDATASETUPDATEOBJECT(CL);
CL.AddTypeS('TCACHEDUPDATESTATUS', '( CUSUNMODIFIED, CUSMODIFIED, CUSINSERTED'
+', CUSDELETED, CUSUNINSERTED )');
SIRegister_TIBSTRINGFIELD(CL);
SIRegister_TIBBCDFIELD(CL);
SIRegister_TIBDATALINK(CL);
CL.AddTypeS('TIBGENERATORAPPLYEVENT', '( GAMONNEWRECORD, GAMONPOST, GAMONSERV'
+'ER )');
SIRegister_TIBGENERATORFIELD(CL);
CL.AddTypeS('TIBUPDATEACTION', '( UAFAIL, UAABORT, UASKIP, UARETRY, UAAPPLY, '
+'UAAPPLIED )');
CL.AddTypeS('TIBUPDATERECORDTYPES', 'set of TCACHEDUPDATESTATUS');
CL.AddTypeS('TLIVEMODE', '( LMINSERT, LMMODIFY, LMDELETE, LMREFRESH )');
CL.AddTypeS('TLIVEMODES', 'set of TLIVEMODE');
SIRegister_TIBCUSTOMDATASET(CL);
SIRegister_TIBDATASET(CL);
end;
(* === run-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure TIBDATASETPREPARED_R(Self: TIBDATASET; var T: BOOLEAN);
begin T := Self.PREPARED; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETFORCEDREFRESH_W(Self: TIBCUSTOMDATASET; const T: BOOLEAN);
begin Self.FORCEDREFRESH := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETFORCEDREFRESH_R(Self: TIBCUSTOMDATASET; var T: BOOLEAN);
begin T := Self.FORCEDREFRESH; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETTRANSACTION_W(Self: TIBCUSTOMDATASET; const T: TIBTRANSACTION);
begin Self.TRANSACTION := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETTRANSACTION_R(Self: TIBCUSTOMDATASET; var T: TIBTRANSACTION);
begin T := Self.TRANSACTION; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETDATABASE_W(Self: TIBCUSTOMDATASET; const T: TIBDATABASE);
begin Self.DATABASE := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETDATABASE_R(Self: TIBCUSTOMDATASET; var T: TIBDATABASE);
begin T := Self.DATABASE; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETPLAN_R(Self: TIBCUSTOMDATASET; var T: STRING);
begin T := Self.PLAN; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETROWSAFFECTED_R(Self: TIBCUSTOMDATASET; var T: INTEGER);
begin T := Self.ROWSAFFECTED; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETUPDATERECORDTYPES_W(Self: TIBCUSTOMDATASET; const T: TIBUPDATERECORDTYPES);
begin Self.UPDATERECORDTYPES := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETUPDATERECORDTYPES_R(Self: TIBCUSTOMDATASET; var T: TIBUPDATERECORDTYPES);
begin T := Self.UPDATERECORDTYPES; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETUPDATESPENDING_R(Self: TIBCUSTOMDATASET; var T: BOOLEAN);
begin T := Self.UPDATESPENDING; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETUPDATEOBJECT_W(Self: TIBCUSTOMDATASET; const T: TIBDATASETUPDATEOBJECT);
begin Self.UPDATEOBJECT := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETUPDATEOBJECT_R(Self: TIBCUSTOMDATASET; var T: TIBDATASETUPDATEOBJECT);
begin T := Self.UPDATEOBJECT; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETTRHANDLE_R(Self: TIBCUSTOMDATASET; var T: PISC_TR_HANDLE);
begin T := Self.TRHANDLE; end;
(*----------------------------------------------------------------------------*)
procedure TIBCUSTOMDATASETDBHANDLE_R(Self: TIBCUSTOMDATASET; var T: PISC_DB_HANDLE);
begin T := Self.DBHANDLE; end;
(*----------------------------------------------------------------------------*)
procedure TIBGENERATORFIELDAPPLYEVENT_W(Self: TIBGENERATORFIELD; const T: TIBGENERATORAPPLYEVENT);
begin Self.APPLYEVENT := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBGENERATORFIELDAPPLYEVENT_R(Self: TIBGENERATORFIELD; var T: TIBGENERATORAPPLYEVENT);
begin T := Self.APPLYEVENT; end;
(*----------------------------------------------------------------------------*)
procedure TIBGENERATORFIELDINCREMENTBY_W(Self: TIBGENERATORFIELD; const T: INTEGER);
begin Self.INCREMENTBY := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBGENERATORFIELDINCREMENTBY_R(Self: TIBGENERATORFIELD; var T: INTEGER);
begin T := Self.INCREMENTBY; end;
(*----------------------------------------------------------------------------*)
procedure TIBGENERATORFIELDGENERATOR_W(Self: TIBGENERATORFIELD; const T: STRING);
begin Self.GENERATOR := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBGENERATORFIELDGENERATOR_R(Self: TIBGENERATORFIELD; var T: STRING);
begin T := Self.GENERATOR; end;
(*----------------------------------------------------------------------------*)
procedure TIBGENERATORFIELDFIELD_W(Self: TIBGENERATORFIELD; const T: STRING);
begin Self.FIELD := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBGENERATORFIELDFIELD_R(Self: TIBGENERATORFIELD; var T: STRING);
begin T := Self.FIELD; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATASETUPDATEOBJECTREFRESHSQL_W(Self: TIBDATASETUPDATEOBJECT; const T: TSTRINGS);
begin Self.REFRESHSQL := T; end;
(*----------------------------------------------------------------------------*)
procedure TIBDATASETUPDATEOBJECTREFRESHSQL_R(Self: TIBDATASETUPDATEOBJECT; var T: TSTRINGS);
begin T := Self.REFRESHSQL; end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TIBDATASET(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TIBDATASET) do
begin
RegisterMethod(@TIBDATASET.PREPARE, 'PREPARE');
RegisterMethod(@TIBDATASET.UNPREPARE, 'UNPREPARE');
RegisterMethod(@TIBDATASET.BATCHINPUT, 'BATCHINPUT');
RegisterMethod(@TIBDATASET.BATCHOUTPUT, 'BATCHOUTPUT');
RegisterMethod(@TIBDATASET.EXECSQL, 'EXECSQL');
RegisterMethod(@TIBDATASET.PARAMBYNAME, 'PARAMBYNAME');
RegisterPropertyHelper(@TIBDATASETPREPARED_R,nil,'PREPARED');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TIBCUSTOMDATASET(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TIBCUSTOMDATASET) do
begin
RegisterMethod(@TIBCUSTOMDATASET.APPLYUPDATES, 'APPLYUPDATES');
RegisterMethod(@TIBCUSTOMDATASET.CACHEDUPDATESTATUS, 'CACHEDUPDATESTATUS');
RegisterMethod(@TIBCUSTOMDATASET.CANCELUPDATES, 'CANCELUPDATES');
RegisterMethod(@TIBCUSTOMDATASET.FETCHALL, 'FETCHALL');
RegisterMethod(@TIBCUSTOMDATASET.LOCATENEXT, 'LOCATENEXT');
// RegisterMethod(@TIBCUSTOMDATASET.LOCATE, 'LOCATE');
RegisterMethod(@TIBCUSTOMDATASET.RECORDMODIFIED, 'RECORDMODIFIED');
RegisterMethod(@TIBCUSTOMDATASET.REVERTRECORD, 'REVERTRECORD');
RegisterMethod(@TIBCUSTOMDATASET.UNDELETE, 'UNDELETE');
RegisterMethod(@TIBCUSTOMDATASET.CURRENT, 'CURRENT');
RegisterMethod(@TIBCUSTOMDATASET.SQLTYPE, 'SQLTYPE');
RegisterPropertyHelper(@TIBCUSTOMDATASETDBHANDLE_R,nil,'DBHANDLE');
RegisterPropertyHelper(@TIBCUSTOMDATASETTRHANDLE_R,nil,'TRHANDLE');
RegisterPropertyHelper(@TIBCUSTOMDATASETUPDATEOBJECT_R,@TIBCUSTOMDATASETUPDATEOBJECT_W,'UPDATEOBJECT');
RegisterPropertyHelper(@TIBCUSTOMDATASETUPDATESPENDING_R,nil,'UPDATESPENDING');
RegisterPropertyHelper(@TIBCUSTOMDATASETUPDATERECORDTYPES_R,@TIBCUSTOMDATASETUPDATERECORDTYPES_W,'UPDATERECORDTYPES');
RegisterPropertyHelper(@TIBCUSTOMDATASETROWSAFFECTED_R,nil,'ROWSAFFECTED');
RegisterPropertyHelper(@TIBCUSTOMDATASETPLAN_R,nil,'PLAN');
RegisterPropertyHelper(@TIBCUSTOMDATASETDATABASE_R,@TIBCUSTOMDATASETDATABASE_W,'DATABASE');
RegisterPropertyHelper(@TIBCUSTOMDATASETTRANSACTION_R,@TIBCUSTOMDATASETTRANSACTION_W,'TRANSACTION');
RegisterPropertyHelper(@TIBCUSTOMDATASETFORCEDREFRESH_R,@TIBCUSTOMDATASETFORCEDREFRESH_W,'FORCEDREFRESH');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TIBGENERATORFIELD(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TIBGENERATORFIELD) do
begin
RegisterConstructor(@TIBGENERATORFIELD.CREATE, 'CREATE');
RegisterMethod(@TIBGENERATORFIELD.VALUENAME, 'VALUENAME');
RegisterMethod(@TIBGENERATORFIELD.APPLY, 'APPLY');
RegisterPropertyHelper(@TIBGENERATORFIELDFIELD_R,@TIBGENERATORFIELDFIELD_W,'FIELD');
RegisterPropertyHelper(@TIBGENERATORFIELDGENERATOR_R,@TIBGENERATORFIELDGENERATOR_W,'GENERATOR');
RegisterPropertyHelper(@TIBGENERATORFIELDINCREMENTBY_R,@TIBGENERATORFIELDINCREMENTBY_W,'INCREMENTBY');
RegisterPropertyHelper(@TIBGENERATORFIELDAPPLYEVENT_R,@TIBGENERATORFIELDAPPLYEVENT_W,'APPLYEVENT');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TIBDATALINK(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TIBDATALINK) do
begin
RegisterConstructor(@TIBDATALINK.CREATE, 'CREATE');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TIBBCDFIELD(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TIBBCDFIELD) do
begin
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TIBSTRINGFIELD(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TIBSTRINGFIELD) do
begin
RegisterMethod(@TIBSTRINGFIELD.GETVALUE, 'GETVALUE');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TIBDATASETUPDATEOBJECT(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TIBDATASETUPDATEOBJECT) do
begin
RegisterPropertyHelper(@TIBDATASETUPDATEOBJECTREFRESHSQL_R,@TIBDATASETUPDATEOBJECTREFRESHSQL_W,'REFRESHSQL');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_IBCustomDataSet(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TIBCUSTOMDATASET) do
with CL.Add(TIBDATASET) do
RIRegister_TIBDATASETUPDATEOBJECT(CL);
RIRegister_TIBSTRINGFIELD(CL);
RIRegister_TIBBCDFIELD(CL);
RIRegister_TIBDATALINK(CL);
RIRegister_TIBGENERATORFIELD(CL);
RIRegister_TIBCUSTOMDATASET(CL);
RIRegister_TIBDATASET(CL);
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TIBBASE(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TIBBASE) do
begin
RegisterConstructor(@TIBBASE.CREATE, 'CREATE');
RegisterVirtualMethod(@TIBBASE.CHECKDATABASE, 'CHECKDATABASE');
RegisterVirtualMethod(@TIBBASE.CHECKTRANSACTION, 'CHECKTRANSACTION');
RegisterPropertyHelper(@TIBBASEBEFOREDATABASEDISCONNECT_R,@TIBBASEBEFOREDATABASEDISCONNECT_W,'BEFOREDATABASEDISCONNECT');
RegisterPropertyHelper(@TIBBASEAFTERDATABASEDISCONNECT_R,@TIBBASEAFTERDATABASEDISCONNECT_W,'AFTERDATABASEDISCONNECT');
RegisterEventPropertyHelper(@TIBBASEONDATABASEFREE_R,@TIBBASEONDATABASEFREE_W,'ONDATABASEFREE');
RegisterPropertyHelper(@TIBBASEBEFORETRANSACTIONEND_R,@TIBBASEBEFORETRANSACTIONEND_W,'BEFORETRANSACTIONEND');
RegisterPropertyHelper(@TIBBASEAFTERTRANSACTIONEND_R,@TIBBASEAFTERTRANSACTIONEND_W,'AFTERTRANSACTIONEND');
RegisterEventPropertyHelper(@TIBBASEONTRANSACTIONFREE_R,@TIBBASEONTRANSACTIONFREE_W,'ONTRANSACTIONFREE');
RegisterPropertyHelper(@TIBBASEDATABASE_R,@TIBBASEDATABASE_W,'DATABASE');
RegisterPropertyHelper(@TIBBASEDBHANDLE_R,nil,'DBHANDLE');
RegisterPropertyHelper(@TIBBASEOWNER_R,nil,'OWNER');
RegisterPropertyHelper(@TIBBASETRHANDLE_R,nil,'TRHANDLE');
RegisterPropertyHelper(@TIBBASETRANSACTION_R,@TIBBASETRANSACTION_W,'TRANSACTION');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TIBTRANSACTION(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TIBTRANSACTION) do
begin
RegisterMethod(@TIBTRANSACTION.CALL, 'CALL');
RegisterMethod(@TIBTRANSACTION.COMMIT, 'COMMIT');
RegisterMethod(@TIBTRANSACTION.COMMITRETAINING, 'COMMITRETAINING');
RegisterMethod(@TIBTRANSACTION.ROLLBACK, 'ROLLBACK');
RegisterMethod(@TIBTRANSACTION.ROLLBACKRETAINING, 'ROLLBACKRETAINING');
RegisterMethod(@TIBTRANSACTION.STARTTRANSACTION, 'STARTTRANSACTION');
RegisterMethod(@TIBTRANSACTION.CHECKINTRANSACTION, 'CHECKINTRANSACTION');
RegisterMethod(@TIBTRANSACTION.CHECKNOTINTRANSACTION, 'CHECKNOTINTRANSACTION');
RegisterMethod(@TIBTRANSACTION.CHECKAUTOSTOP, 'CHECKAUTOSTOP');
RegisterMethod(@TIBTRANSACTION.ADDDATABASE, 'ADDDATABASE');
RegisterMethod(@TIBTRANSACTION.FINDDATABASE, 'FINDDATABASE');
RegisterMethod(@TIBTRANSACTION.FINDDEFAULTDATABASE, 'FINDDEFAULTDATABASE');
RegisterMethod(@TIBTRANSACTION.REMOVEDATABASE, 'REMOVEDATABASE');
RegisterMethod(@TIBTRANSACTION.REMOVEDATABASES, 'REMOVEDATABASES');
RegisterMethod(@TIBTRANSACTION.CHECKDATABASESINLIST, 'CHECKDATABASESINLIST');
RegisterPropertyHelper(@TIBTRANSACTIONDATABASECOUNT_R,nil,'DATABASECOUNT');
RegisterPropertyHelper(@TIBTRANSACTIONDATABASES_R,nil,'DATABASES');
RegisterPropertyHelper(@TIBTRANSACTIONSQLOBJECTCOUNT_R,nil,'SQLOBJECTCOUNT');
RegisterPropertyHelper(@TIBTRANSACTIONSQLOBJECTS_R,nil,'SQLOBJECTS');
RegisterPropertyHelper(@TIBTRANSACTIONHANDLE_R,nil,'HANDLE');
RegisterPropertyHelper(@TIBTRANSACTIONHANDLEISSHARED_R,nil,'HANDLEISSHARED');
RegisterPropertyHelper(@TIBTRANSACTIONINTRANSACTION_R,nil,'INTRANSACTION');
RegisterPropertyHelper(@TIBTRANSACTIONTPB_R,nil,'TPB');
RegisterPropertyHelper(@TIBTRANSACTIONTPBLENGTH_R,nil,'TPBLENGTH');
RegisterPropertyHelper(@TIBTRANSACTIONACTIVE_R,@TIBTRANSACTIONACTIVE_W,'ACTIVE');
RegisterPropertyHelper(@TIBTRANSACTIONDEFAULTDATABASE_R,@TIBTRANSACTIONDEFAULTDATABASE_W,'DEFAULTDATABASE');
RegisterPropertyHelper(@TIBTRANSACTIONIDLETIMER_R,@TIBTRANSACTIONIDLETIMER_W,'IDLETIMER');
RegisterPropertyHelper(@TIBTRANSACTIONDEFAULTACTION_R,@TIBTRANSACTIONDEFAULTACTION_W,'DEFAULTACTION');
RegisterPropertyHelper(@TIBTRANSACTIONPARAMS_R,@TIBTRANSACTIONPARAMS_W,'PARAMS');
RegisterPropertyHelper(@TIBTRANSACTIONAUTOSTOPACTION_R,@TIBTRANSACTIONAUTOSTOPACTION_W,'AUTOSTOPACTION');
RegisterEventPropertyHelper(@TIBTRANSACTIONONIDLETIMER_R,@TIBTRANSACTIONONIDLETIMER_W,'ONIDLETIMER');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_TIBDATABASE(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TIBDATABASE) do
begin
RegisterMethod(@TIBDATABASE.ADDEVENTNOTIFIER, 'ADDEVENTNOTIFIER');
RegisterMethod(@TIBDATABASE.REMOVEEVENTNOTIFIER, 'REMOVEEVENTNOTIFIER');
RegisterMethod(@TIBDATABASE.APPLYUPDATES, 'APPLYUPDATES');
RegisterMethod(@TIBDATABASE.CLOSEDATASETS, 'CLOSEDATASETS');
RegisterMethod(@TIBDATABASE.CHECKACTIVE, 'CHECKACTIVE');
RegisterMethod(@TIBDATABASE.CHECKINACTIVE, 'CHECKINACTIVE');
RegisterMethod(@TIBDATABASE.CREATEDATABASE, 'CREATEDATABASE');
RegisterMethod(@TIBDATABASE.DROPDATABASE, 'DROPDATABASE');
RegisterMethod(@TIBDATABASE.FORCECLOSE, 'FORCECLOSE');
RegisterMethod(@TIBDATABASE.GETFIELDNAMES, 'GETFIELDNAMES');
RegisterMethod(@TIBDATABASE.GETTABLENAMES, 'GETTABLENAMES');
RegisterMethod(@TIBDATABASE.INDEXOFDBCONST, 'INDEXOFDBCONST');
RegisterMethod(@TIBDATABASE.TESTCONNECTED, 'TESTCONNECTED');
RegisterMethod(@TIBDATABASE.CHECKDATABASENAME, 'CHECKDATABASENAME');
RegisterMethod(@TIBDATABASE.CALL, 'CALL');
RegisterMethod(@TIBDATABASE.Open, 'OPEN');
RegisterMethod(@TIBDATABASE.Close, 'CLOSE');
RegisterMethod(@TIBDATABASE.ADDTRANSACTION, 'ADDTRANSACTION');
RegisterMethod(@TIBDATABASE.FINDTRANSACTION, 'FINDTRANSACTION');
RegisterMethod(@TIBDATABASE.FINDDEFAULTTRANSACTION, 'FINDDEFAULTTRANSACTION');
RegisterMethod(@TIBDATABASE.REMOVETRANSACTION, 'REMOVETRANSACTION');
RegisterMethod(@TIBDATABASE.REMOVETRANSACTIONS, 'REMOVETRANSACTIONS');
RegisterMethod(@TIBDATABASE.SETHANDLE, 'SETHANDLE');
RegisterPropertyHelper(@TIBDATABASEHANDLE_R,nil,'HANDLE');
RegisterPropertyHelper(@TIBDATABASEISREADONLY_R,nil,'ISREADONLY');
RegisterPropertyHelper(@TIBDATABASEDBPARAMBYDPB_R,@TIBDATABASEDBPARAMBYDPB_W,'DBPARAMBYDPB');
RegisterPropertyHelper(@TIBDATABASESQLOBJECTCOUNT_R,nil,'SQLOBJECTCOUNT');
RegisterPropertyHelper(@TIBDATABASESQLOBJECTS_R,nil,'SQLOBJECTS');
RegisterPropertyHelper(@TIBDATABASEHANDLEISSHARED_R,nil,'HANDLEISSHARED');
RegisterPropertyHelper(@TIBDATABASETRANSACTIONCOUNT_R,nil,'TRANSACTIONCOUNT');
RegisterPropertyHelper(@TIBDATABASETRANSACTIONS_R,nil,'TRANSACTIONS');
RegisterPropertyHelper(@TIBDATABASEINTERNALTRANSACTION_R,nil,'INTERNALTRANSACTION');
RegisterMethod(@TIBDATABASE.HAS_DEFAULT_VALUE, 'HAS_DEFAULT_VALUE');
RegisterMethod(@TIBDATABASE.HAS_COMPUTED_BLR, 'HAS_COMPUTED_BLR');
RegisterMethod(@TIBDATABASE.FLUSHSCHEMA, 'FLUSHSCHEMA');
RegisterPropertyHelper(@TIBDATABASEDATABASENAME_R,@TIBDATABASEDATABASENAME_W,'DATABASENAME');
RegisterPropertyHelper(@TIBDATABASECONNECTED_R,@TIBDATABASECONNECTED_W,'CONNECTED');
RegisterPropertyHelper(@TIBDATABASEPARAMS_R,@TIBDATABASEPARAMS_W,'PARAMS');
RegisterPropertyHelper(@TIBDATABASEDEFAULTTRANSACTION_R,@TIBDATABASEDEFAULTTRANSACTION_W,'DEFAULTTRANSACTION');
RegisterPropertyHelper(@TIBDATABASEIDLETIMER_R,@TIBDATABASEIDLETIMER_W,'IDLETIMER');
RegisterPropertyHelper(@TIBDATABASESQLDIALECT_R,@TIBDATABASESQLDIALECT_W,'SQLDIALECT');
RegisterPropertyHelper(@TIBDATABASEDBSQLDIALECT_R,nil,'DBSQLDIALECT');
RegisterPropertyHelper(@TIBDATABASETRACEFLAGS_R,@TIBDATABASETRACEFLAGS_W,'TRACEFLAGS');
RegisterPropertyHelper(@TIBDATABASEALLOWSTREAMEDCONNECTED_R,@TIBDATABASEALLOWSTREAMEDCONNECTED_W,'ALLOWSTREAMEDCONNECTED');
RegisterEventPropertyHelper(@TIBDATABASEONLOGIN_R,@TIBDATABASEONLOGIN_W,'ONLOGIN');
RegisterEventPropertyHelper(@TIBDATABASEONIDLETIMER_R,@TIBDATABASEONIDLETIMER_W,'ONIDLETIMER');
RegisterEventPropertyHelper(@TIBDATABASEONDIALECTDOWNGRADEWARNING_R,@TIBDATABASEONDIALECTDOWNGRADEWARNING_W,'ONDIALECTDOWNGRADEWARNING');
end;
end;
(*----------------------------------------------------------------------------*)
procedure RIRegister_IBDatabase(CL: TPSRuntimeClassImporter);
begin
with CL.Add(TIBDATABASE) do
with CL.Add(TIBTRANSACTION) do
with CL.Add(TIBBASE) do
RIRegister_TIBDATABASE(CL);
RIRegister_TIBTRANSACTION(CL);
RIRegister_TIBBASE(CL);
end;
(* === compile-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure SIRegister_TIBTABLE(CL: TPSPascalCompiler);
begin
//with RegClassS(CL,'TIBCUSTOMDATASET', 'TIBTABLE') do
with CL.AddClassN(CL.FindClass('TIBCUSTOMDATASET'),'TIBTABLE') do
begin
RegisterMethod('Procedure ADDINDEX( const NAME, FIELDS : STRING; OPTIONS : TINDEXOPTIONS; const DESCFIELDS : STRING)');
RegisterMethod('Procedure CREATETABLE');
RegisterMethod('Procedure DELETEINDEX( const NAME : STRING)');
RegisterMethod('Procedure DELETETABLE');
RegisterMethod('Procedure EMPTYTABLE');
RegisterMethod('Procedure GETINDEXNAMES( LIST : TSTRINGS)');
RegisterMethod('Procedure GOTOCURRENT( TABLE : TIBTABLE)');
RegisterProperty('CURRENTDBKEY', 'TIBDBKEY', iptr);
RegisterProperty('EXISTS', 'BOOLEAN', iptr);
RegisterProperty('INDEXFIELDCOUNT', 'INTEGER', iptr);
RegisterProperty('INDEXFIELDS', 'TFIELD INTEGER', iptrw);
RegisterProperty('TABLENAMES', 'TSTRINGS', iptr);
RegisterProperty('DEFAULTINDEX', 'BOOLEAN', iptrw);
RegisterProperty('INDEXDEFS', 'TINDEXDEFS', iptrw);
RegisterProperty('INDEXFIELDNAMES', 'STRING', iptrw);
RegisterProperty('INDEXNAME', 'STRING', iptrw);
RegisterProperty('MASTERFIELDS', 'STRING', iptrw);
RegisterProperty('MASTERSOURCE', 'TDATASOURCE', iptrw);
RegisterProperty('READONLY', 'BOOLEAN', iptrw);
RegisterProperty('STOREDEFS', 'BOOLEAN', iptrw);
RegisterProperty('TABLENAME', 'STRING', iptrw);
RegisterProperty('TABLETYPES', 'TIBTABLETYPES', iptrw);
end;
end;
(*----------------------------------------------------------------------------*)
procedure SIRegister_IBTable(CL: TPSPascalCompiler);