odpic-sys 0.2.0

Bindings to Oracle Database Programming Interface for C (ODPI-C).
Documentation
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
/* automatically generated by rust-bindgen 0.70.1 */

extern "C" {

    /// Performs an immediate (asynchronous) termination of any currently executing
    /// function on the server associated with the connection.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_breakExecution(conn: *mut dpiConn) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Changes the password of the specified user.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_changePassword(
        conn: *mut dpiConn,
        userName: *const ::std::os::raw::c_char,
        userNameLength: u32,
        oldPassword: *const ::std::os::raw::c_char,
        oldPasswordLength: u32,
        newPassword: *const ::std::os::raw::c_char,
        newPasswordLength: u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Closes the connection and makes it unusable for further activity. Any open
    /// statements and LOBs associated with the connection will also be closed and
    /// made unusable for further activity.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_close(
        conn: *mut dpiConn,
        mode: dpiConnCloseMode,
        tag: *const ::std::os::raw::c_char,
        tagLength: u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Commits the current active transaction.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_commit(conn: *mut dpiConn) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Creates a standalone connection to a database or acquires a connection
    /// from a session pool and returns a reference to the connection.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    /// If a failure occurs, the errorInfo structure is filled in with error
    /// information.
    pub fn dpiConn_create(
        context: *const dpiContext,
        userName: *const ::std::os::raw::c_char,
        userNameLength: u32,
        password: *const ::std::os::raw::c_char,
        passwordLength: u32,
        connectString: *const ::std::os::raw::c_char,
        connectStringLength: u32,
        commonParams: *const dpiCommonCreateParams,
        createParams: *mut dpiConnCreateParams,
        conn: *mut *mut dpiConn,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Dequeues a message from a queue. This function is deprecated and will be
    /// removed in version 4. One of the functions [`dpiQueue_deqOne()`] or
    /// [`dpiQueue_deqMany()`] should be used instead.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_deqObject(
        conn: *mut dpiConn,
        queueName: *const ::std::os::raw::c_char,
        queueNameLength: u32,
        options: *mut dpiDeqOptions,
        props: *mut dpiMsgProps,
        payload: *mut dpiObject,
        msgId: *mut *const ::std::os::raw::c_char,
        msgIdLength: *mut u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Enqueues a message to a queue. This function is deprecated and will be
    /// removed in version 4. One of the functions [`dpiQueue_enqOne()`] or
    /// [`dpiQueue_enqMany()`] should be used instead.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_enqObject(
        conn: *mut dpiConn,
        queueName: *const ::std::os::raw::c_char,
        queueNameLength: u32,
        options: *mut dpiEnqOptions,
        props: *mut dpiMsgProps,
        payload: *mut dpiObject,
        msgId: *mut *const ::std::os::raw::c_char,
        msgIdLength: *mut u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Looks up an object type by name in the database and returns a reference to
    /// it. The reference should be released as soon as it is no longer needed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_getObjectType(
        conn: *mut dpiConn,
        name: *const ::std::os::raw::c_char,
        nameLength: u32,
        objType: *mut *mut dpiObjectType,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Returns the version information of the Oracle Database to which the
    /// connection has been made.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_getServerVersion(
        conn: *mut dpiConn,
        releaseString: *mut *const ::std::os::raw::c_char,
        releaseStringLength: *mut u32,
        versionInfo: *mut dpiVersionInfo,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Return a reference to a SODA database which can be used to create, open
    /// and drop collections. The connection that is passed should remain open
    /// while SODA operations are being performed. If the connection is closed an
    /// error will take place when the next SODA operation is attempted.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_getSodaDb(conn: *mut dpiConn, db: *mut *mut dpiSodaDb) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Returns a reference to a new temporary LOB which may subsequently be
    /// written and bound to a statement. The reference should be released as soon
    /// as it is no longer needed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_newTempLob(
        conn: *mut dpiConn,
        lobType: dpiOracleTypeNum,
        lob: *mut *mut dpiLob,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Pings the database to determine if a connection is usable.
    /// 
    /// This function does the local, light-weight checks of
    /// [`dpiConn_getIsHealthy()`] and additionally performs a round-trip to
    /// the database if the local checks are successful.
    /// 
    /// The session pool internally may perform this check before returning a
    /// connection to the application. This depends on the value of
    /// DPI_DEFAULT_PING_INTERVAL and when the connection was returned to the pool.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    /// 
    /// If DPI_FAILURE is returned, the application should close the connection.
    pub fn dpiConn_ping(conn: *mut dpiConn) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the connection. A count of the references to the
    /// connection is maintained and when this count reaches zero, the memory
    /// associated with the connection is freed and the connection is closed or
    /// released back to the session pool if that has not already taken place using
    /// the function [`dpiConn_close()`].
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_release(conn: *mut dpiConn) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Rolls back the current active transaction.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_rollback(conn: *mut dpiConn) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Shuts down the database. This function must be called twice for the
    /// database to be shut down successfully. After calling this function the
    /// first time, the SQL statements “alter database close normal” and
    /// “alter database dismount” must be executed. Once that is complete this
    /// function should be called again with the mode DPI_MODE_SHUTDOWN_FINAL
    /// in order to complete the orderly shutdown of the database.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_shutdownDatabase(
        conn: *mut dpiConn,
        mode: dpiShutdownMode,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Starts up a database.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_startupDatabase(
        conn: *mut dpiConn,
        mode: dpiStartupMode,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Starts up a database with a parameter file (PFILE).
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_startupDatabaseWithPfile(
        conn: *mut dpiConn,
        pfile: *const ::std::os::raw::c_char,
        pfileLength: u32,
        mode: dpiStartupMode,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Returns a reference to a subscription which is used for requesting
    /// notifications of events that take place in the database. Events that are
    /// supported are changes on tables or queries (continuous query notification)
    /// and the availability of messages to dequeue (advanced queuing). The
    /// reference should be released as soon as it is no longer needed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_subscribe(
        conn: *mut dpiConn,
        params: *mut dpiSubscrCreateParams,
        subscr: *mut *mut dpiSubscr,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Begins a new TPC (two-phase commit) transaction with the given transaction
    /// id (XID).
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_tpcBegin(
        conn: *mut dpiConn,
        xid: *mut dpiXid,
        transactionTimeout: u32,
        flags: u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Commits a TPC (two-phase commit) transaction.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_tpcCommit(
        conn: *mut dpiConn,
        xid: *mut dpiXid,
        onePhase: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Ends a TPC (two-phase commit) transaction with the given transaction
    /// id (XID).
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_tpcEnd(
        conn: *mut dpiConn,
        xid: *mut dpiXid,
        flags: u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Forgets a TPC (two-phase commit) transaction.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_tpcForget(conn: *mut dpiConn, xid: *mut dpiXid) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Prepares a TPC (two-phase commit) transaction for commit. This function
    /// should only be called after [`dpiConn_tpcBegin()`] is called and before
    /// [`dpiConn_tpcCommit()`] or [`dpiConn_commit()`] is called.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_tpcPrepare(
        conn: *mut dpiConn,
        xid: *mut dpiXid,
        commitNeeded: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Rolls back a TPC (two-phase commit) transaction.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_tpcRollback(conn: *mut dpiConn, xid: *mut dpiXid) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Unsubscribes from the events that were earlier subscribed to via the
    /// function [`dpiConn_subscribe()`]. Once this function completes
    /// successfully no further notifications will be sent for this subscription.
    /// Note that this method does not generate a notification either.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiConn_unsubscribe(conn: *mut dpiConn, subscr: *mut dpiSubscr)
        -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the dequeue options. A count of the references to
    /// the dequeue options is maintained and when this count reaches zero, the
    /// memory associated with the options is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiDeqOptions_release(options: *mut dpiDeqOptions) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the enqueue options. A count of the references to
    /// the enqueue options is maintained and when this count reaches zero, the
    /// memory associated with the options is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiEnqOptions_release(options: *mut dpiEnqOptions) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Returns the top node of a hierarchy of nodes containing the data stored in
    /// the JSON value.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiJson_getValue(
        json: *mut dpiJson,
        options: u32,
        topNode: *mut *mut dpiJsonNode,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the JSON value. A count of the references to the
    /// JSON value is maintained and when this count reaches zero, the memory
    /// associated with the JSON value is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiJson_release(json: *mut dpiJson) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Closes the LOB and makes it unusable for further operations immediately,
    /// rather than when the reference count reaches zero.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiLob_close(lob: *mut dpiLob) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Closes the LOB resource. This should be done when a batch of writes has
    /// been completed so that the indexes associated with the LOB can be updated.
    /// It should only be performed if a call to function
    /// [`dpiLob_openResource()`] has been performed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiLob_closeResource(lob: *mut dpiLob) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Creates an independent copy of a LOB and returns a reference to the newly
    /// created LOB. This reference should be released as soon as it is no longer
    /// needed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiLob_copy(lob: *mut dpiLob, copiedLob: *mut *mut dpiLob) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Returns the chunk size, in bytes, of the internal LOB. Reading and writing
    /// to the LOB in multiples of this size will improve performance.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiLob_getChunkSize(lob: *mut dpiLob, size: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Returns a boolean value indicating if the file referenced by the BFILE type
    /// LOB exists (1) or not (0).
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiLob_getFileExists(
        lob: *mut dpiLob,
        exists: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Returns a boolean value indicating if the LOB resource has been opened by
    /// making a call to the function [`dpiLob_openResource()`] (1) or not (0).
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiLob_getIsResourceOpen(
        lob: *mut dpiLob,
        isOpen: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Returns the size of the data stored in the LOB. For character LOBs the size
    /// is in characters; for binary LOBs the size is in bytes.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    /// 
    /// **WARNING**: for historical reasons, Oracle stores CLOBs and NCLOBs using
    /// the UTF-16 encoding, regardless of what encoding is otherwise in use by the
    /// database. The number of characters, however, is defined by the number of
    /// UCS-2 codepoints. For this reason, if a character requires more than one
    /// UCS-2 codepoint, the size returned will be inaccurate and care must be
    /// taken to account for the difference.
    pub fn dpiLob_getSize(lob: *mut dpiLob, size: *mut u64) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Opens the LOB resource for writing. This will improve performance when
    /// writing to the LOB in chunks and there are functional or extensible indexes
    /// associated with the LOB. If this function is not called, the LOB resource
    /// will be opened and closed for each write that is performed. A call to the
    /// function [`dpiLob_closeResource()`] should be done before performing a
    /// call to the function [`dpiConn_commit()`].
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiLob_openResource(lob: *mut dpiLob) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Reads data from the LOB at the specified offset into the provided buffer.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    /// 
    /// **WARNING**: for historical reasons, Oracle stores CLOBs and NCLOBs using
    /// the UTF-16 encoding, regardless of what encoding is otherwise in use by the
    /// database. The number of characters, however, is defined by the number of
    /// UCS-2 codepoints. For this reason, if a character requires more than one
    /// UCS-2 codepoint, care must be taken to account for them in both the offset
    /// and amount parameters.
    pub fn dpiLob_readBytes(
        lob: *mut dpiLob,
        offset: u64,
        amount: u64,
        value: *mut ::std::os::raw::c_char,
        valueLength: *mut u64,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the LOB. A count of the references to the LOB is
    /// maintained and when this count reaches zero, the memory associated with the
    /// LOB is freed. The LOB is also closed unless that has already taken place
    /// using the function [`dpiLob_close()`].
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiLob_release(lob: *mut dpiLob) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Replaces all of the data in the LOB with the contents of the provided
    /// buffer. The LOB will first be cleared and then the provided data will be
    /// written.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiLob_setFromBytes(
        lob: *mut dpiLob,
        value: *const ::std::os::raw::c_char,
        valueLength: u64,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Trims the data in the LOB so that it only contains the specified amount of
    /// data.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiLob_trim(lob: *mut dpiLob, newSize: u64) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Write data to the LOB at the specified offset using the provided buffer as
    /// the source. If multiple calls to this function are planned, the LOB should
    /// first be opened using the function [`dpiLob_openResource()`].
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    /// 
    /// **WARNING**: for historical reasons, Oracle stores CLOBs and NCLOBs using
    /// the UTF-16 encoding, regardless of what encoding is otherwise in use by the
    /// database. The number of characters, however, is defined by the number of
    /// UCS-2 codepoints. For this reason, if a character requires more than one
    /// UCS-2 codepoint, care must be taken to account for them in the offset
    /// parameter.
    pub fn dpiLob_writeBytes(
        lob: *mut dpiLob,
        offset: u64,
        value: *const ::std::os::raw::c_char,
        valueLength: u64,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the message properties. A count of the references
    /// to the message properties is maintained and when this count reaches zero,
    /// the memory associated with the properties is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiMsgProps_release(props: *mut dpiMsgProps) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the object. A count of the references to the object
    /// is maintained and when this count reaches zero, the memory associated with
    /// the object is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiObject_release(obj: *mut dpiObject) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the attribute. A count of the references to the
    /// attribute is maintained and when this count reaches zero, the memory
    /// associated with the attribute is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiObjectAttr_release(attr: *mut dpiObjectAttr) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the object type. A count of the references to the
    /// object type is maintained and when this count reaches zero, the memory
    /// associated with the object type is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiObjectType_release(objType: *mut dpiObjectType) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Acquires a connection from the pool and returns a reference to it. This
    /// reference should be released by calling [`dpiConn_release()`] as soon
    /// as it is no longer needed, which will also return the connection back to
    /// the pool for subsequent calls to this function. The connection can be
    /// returned back to the pool earlier by calling [`dpiConn_close()`].
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiPool_acquireConnection(
        pool: *mut dpiPool,
        userName: *const ::std::os::raw::c_char,
        userNameLength: u32,
        password: *const ::std::os::raw::c_char,
        passwordLength: u32,
        createParams: *mut dpiConnCreateParams,
        conn: *mut *mut dpiConn,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Closes the pool and makes it unusable for further activity.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiPool_close(pool: *mut dpiPool, closeMode: dpiPoolCloseMode) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Creates a session pool which creates and maintains a group of stateless
    /// sessions to the database. The main benefit of session pooling is
    /// performance since making a connection to the database is a time-consuming
    /// activity, especially when the database is remote.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    /// If a failure occurs, the errorInfo structure is filled in with error
    /// information.
    pub fn dpiPool_create(
        context: *const dpiContext,
        userName: *const ::std::os::raw::c_char,
        userNameLength: u32,
        password: *const ::std::os::raw::c_char,
        passwordLength: u32,
        connectString: *const ::std::os::raw::c_char,
        connectStringLength: u32,
        commonParams: *const dpiCommonCreateParams,
        createParams: *mut dpiPoolCreateParams,
        pool: *mut *mut dpiPool,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the pool. A count of the references to the pool is
    /// maintained and when this count reaches zero, the memory associated with the
    /// pool is freed and the session pool is closed if that has not already
    /// taken place using the function [`dpiPool_close()`].
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiPool_release(pool: *mut dpiPool) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Dequeues multiple messages from the queue.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiQueue_deqMany(
        queue: *mut dpiQueue,
        numProps: *mut u32,
        props: *mut *mut dpiMsgProps,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Dequeues a single message from the queue.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiQueue_deqOne(
        queue: *mut dpiQueue,
        props: *mut *mut dpiMsgProps,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Enqueues multiple messages into the queue.
    /// 
    /// Warning: calling this function in parallel on different connections
    /// acquired from the same pool may fail due to Oracle bug 29928074. Ensure
    /// that this function is not run in parallel, use standalone connections or
    /// connections from different pools, or make multiple calls to
    /// [`dpiQueue_enqOne()`] instead. The function [`dpiQueue_deqMany()`]
    /// call is not affected.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiQueue_enqMany(
        queue: *mut dpiQueue,
        numProps: u32,
        props: *mut *mut dpiMsgProps,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Enqueues a single mesasge into the queue.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiQueue_enqOne(queue: *mut dpiQueue, props: *mut dpiMsgProps) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the queue. A count of the references to the queue
    /// is maintained and when this count reaches zero, the memory associated with
    /// the queue is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiQueue_release(queue: *mut dpiQueue) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Changes pool configuration corresponding to members
    /// [`dpiPoolCreateParams.minSessions`],
    /// [`dpiPoolCreateParams.maxSessions`] and
    /// [`dpiPoolCreateParams.sessionIncrement`] to the specified values.
    /// Connections will be created as needed if the value of *minSessions* is
    /// increased. Connections will be dropped from the pool as they are released
    /// back to the pool if *minSessions* is decreased.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiPool_reconfigure(
        pool: *mut dpiPool,
        minSessions: u32,
        maxSessions: u32,
        sessionIncrement: u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Create an index on the collection, which can improve the performance of
    /// SODA query-by-examples (QBE). An index is defined by a specification,
    /// which is a JSON-encoded string that specifies how particular QBE patterns
    /// are to be indexed for quicker matching. See
    /// [Overview of SODA indexing](https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-4848E6A0-58A7-44FD-8D6D-A033D0CCF9CB).
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_createIndex(
        coll: *mut dpiSodaColl,
        indexSpec: *const ::std::os::raw::c_char,
        indexSpecLength: u32,
        flags: u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Drops a SODA collection from the database.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_drop(
        coll: *mut dpiSodaColl,
        flags: u32,
        isDropped: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Drop an index on the collection.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_dropIndex(
        coll: *mut dpiSodaColl,
        name: *const ::std::os::raw::c_char,
        nameLength: u32,
        flags: u32,
        isDropped: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Finds all of the documents in the collection that match the specified
    /// options.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_find(
        coll: *mut dpiSodaColl,
        options: *const dpiSodaOperOptions,
        flags: u32,
        cursor: *mut *mut dpiSodaDocCursor,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Finds a single document in the collection that matches the specified
    /// options.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_findOne(
        coll: *mut dpiSodaColl,
        options: *const dpiSodaOperOptions,
        flags: u32,
        doc: *mut *mut dpiSodaDoc,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Returns a document containing the data guide for the collection. See
    /// [JSON Data Guide](https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-219FC30E-89A7-4189-BC36-7B961A24067C).
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_getDataGuide(
        coll: *mut dpiSodaColl,
        flags: u32,
        doc: *mut *mut dpiSodaDoc,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Returns the number of documents in the collection that match the specified
    /// options.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_getDocCount(
        coll: *mut dpiSodaColl,
        options: *const dpiSodaOperOptions,
        flags: u32,
        count: *mut u64,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Inserts multiple documents into the collection and optionally returns
    /// result documents containing information about the newly inserted documents.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    /// On failure the offset attribute in the [`dpiErrorInfo`]
    /// structure will contain the index into the SODA document handles array where
    /// the error took place.
    /// 
    /// NOTE: this function requires Oracle Client 18.5 or higher in addition to
    /// the usual SODA requirements and is currently available only as a preview.
    pub fn dpiSodaColl_insertMany(
        coll: *mut dpiSodaColl,
        numDocs: u32,
        docs: *mut *mut dpiSodaDoc,
        flags: u32,
        insertedDocs: *mut *mut dpiSodaDoc,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Inserts multiple documents into the collection and optionally returns
    /// result documents containing information about the newly inserted documents.
    /// In addition, options can be supplied to modify how the documents are
    /// inserted or returned.
    /// 
    /// This function requires Oracle Client 21.3 or higher to be used in addition
    /// to the normal SODA requirements (also available in Oracle Client 19 from
    /// 19.11).
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    /// On failure the offset attribute in the [`dpiErrorInfo`]
    /// structure will contain the index into the SODA document handles array where
    /// the error took place.
    pub fn dpiSodaColl_insertManyWithOptions(
        coll: *mut dpiSodaColl,
        numDocs: u32,
        docs: *mut *mut dpiSodaDoc,
        options: *mut dpiSodaOperOptions,
        flags: u32,
        insertedDocs: *mut *mut dpiSodaDoc,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Inserts a document into the collection and optionally returns it.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_insertOne(
        coll: *mut dpiSodaColl,
        doc: *mut dpiSodaDoc,
        flags: u32,
        insertedDoc: *mut *mut dpiSodaDoc,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Inserts a document into the collection and optionally returns it. In
    /// addition, options can be supplied to modify how the document is inserted or
    /// returned.
    /// 
    /// This method requires Oracle Client 21.3 or higher to be used in addition to
    /// the normal SODA requirements (also available in Oracle Client 19 from
    /// 19.11).
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_insertOneWithOptions(
        coll: *mut dpiSodaColl,
        doc: *mut dpiSodaDoc,
        options: *mut dpiSodaOperOptions,
        flags: u32,
        insertedDoc: *mut *mut dpiSodaDoc,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Returns a list of indexes associated with the collection.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_listIndexes(
        coll: *mut dpiSodaColl,
        flags: u32,
        list: *mut dpiStringList,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the SODA collection. A count of the references to
    /// the collection is maintained and when this count reaches zero, the memory
    /// associated with the collection is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_release(coll: *mut dpiSodaColl) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Removes all of the documents in the collection that match the specified
    /// options.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_remove(
        coll: *mut dpiSodaColl,
        options: *const dpiSodaOperOptions,
        flags: u32,
        count: *mut u64,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Replaces the single document in the collection matching the given options
    /// with the new document.
    pub fn dpiSodaColl_replaceOne(
        coll: *mut dpiSodaColl,
        options: *const dpiSodaOperOptions,
        doc: *mut dpiSodaDoc,
        flags: u32,
        replaced: *mut ::std::os::raw::c_int,
        replacedDoc: *mut *mut dpiSodaDoc,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Saves a document into the collection. This method is equivalent to
    /// [`dpiSodaColl_insertOne()`] except that if client-assigned keys are
    /// used, and the document with the specified key already exists in the
    /// collection, it will be replaced with the input document.
    /// 
    /// This method requires Oracle Client 19.9 or higher to be used in addition to
    /// the normal SODA requirements.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_save(
        coll: *mut dpiSodaColl,
        doc: *mut dpiSodaDoc,
        flags: u32,
        savedDoc: *mut *mut dpiSodaDoc,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Saves a document into the collection. This method is equivalent to
    /// [`dpiSodaColl_insertOneWithOptions()`] except that if client-assigned
    /// keys are used, and the document with the specified key already exists in
    /// the collection, it will be replaced with the input document.
    /// 
    /// This method requires Oracle Client 21.3 or higher to be used in addition to
    /// the normal SODA requirements (also available in Oracle Client 19 from
    /// 19.11).
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_saveWithOptions(
        coll: *mut dpiSodaColl,
        doc: *mut dpiSodaDoc,
        options: *mut dpiSodaOperOptions,
        flags: u32,
        savedDoc: *mut *mut dpiSodaDoc,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Removes all of the documents in a SODA collection in a similar manner to
    /// a TRUNCATE TABLE statement.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaColl_truncate(coll: *mut dpiSodaColl) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Gets the next collection from the cursor, if there is one.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaCollCursor_getNext(
        cursor: *mut dpiSodaCollCursor,
        flags: u32,
        coll: *mut *mut dpiSodaColl,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the SODA collection cursor. A count of the
    /// references to the cursor is maintained and when this count reaches zero,
    /// the memory associated with the cursor is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaCollCursor_release(cursor: *mut dpiSodaCollCursor) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Creates a new SODA collection if a collection by that name does not exist.
    /// If a collection by that name already exists, the collection is opened if
    /// the metadata of the collection is equivalent to the supplied metadata;
    /// otherwise, an error is returned.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    /// 
    /// NOTE: the creation of the collection is performed using an autonomous
    /// transaction. Any current transaction is left unchanged.
    pub fn dpiSodaDb_createCollection(
        db: *mut dpiSodaDb,
        name: *const ::std::os::raw::c_char,
        nameLength: u32,
        metadata: *const ::std::os::raw::c_char,
        metadataLength: u32,
        flags: u32,
        coll: *mut *mut dpiSodaColl,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Return a cursor to iterate over the SODA collections available in the
    /// database.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaDb_getCollections(
        db: *mut dpiSodaDb,
        startName: *const ::std::os::raw::c_char,
        startNameLength: u32,
        flags: u32,
        cursor: *mut *mut dpiSodaCollCursor,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Return an array of names of SODA collections available in the database.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaDb_getCollectionNames(
        db: *mut dpiSodaDb,
        startName: *const ::std::os::raw::c_char,
        startNameLength: u32,
        limit: u32,
        flags: u32,
        names: *mut dpiStringList,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Opens an existing SODA collection.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaDb_openCollection(
        db: *mut dpiSodaDb,
        name: *const ::std::os::raw::c_char,
        nameLength: u32,
        flags: u32,
        coll: *mut *mut dpiSodaColl,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the database. A count of the references to the
    /// database is maintained and when this count reaches zero, the memory
    /// associated with the database is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaDb_release(db: *mut dpiSodaDb) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the SODA document. A count of the references to
    /// the document is maintained and when this count reaches zero, the memory
    /// associated with the document is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaDoc_release(doc: *mut dpiSodaDoc) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Gets the next document from the cursor, if there is one.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaDocCursor_getNext(
        cursor: *mut dpiSodaDocCursor,
        flags: u32,
        doc: *mut *mut dpiSodaDoc,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the SODA document cursor. A count of the
    /// references to the cursor is maintained and when this count reaches zero,
    /// the memory associated with the cursor is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSodaDocCursor_release(cursor: *mut dpiSodaDocCursor) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Executes the statement using the bound values. For queries this makes
    /// available metadata which can be acquired using the function
    /// [`dpiStmt_getQueryInfo()`]. For non-queries, out and in-out variables
    /// are populated with their values.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiStmt_execute(
        stmt: *mut dpiStmt,
        mode: dpiExecMode,
        numQueryColumns: *mut u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Executes the statement the specified number of times using the bound
    /// values. Each bound variable must have at least this many elements allocated
    /// or an error is returned.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiStmt_executeMany(
        stmt: *mut dpiStmt,
        mode: dpiExecMode,
        numIters: u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Fetches a single row from the buffers defined for the query. If no row is
    /// available in the buffers, an internal fetch takes place to populate them,
    /// if rows are available. The number of rows fetched into the internal
    /// buffers can be set by calling [`dpiStmt_setFetchArraySize()`]. If the
    /// statement does not refer to a query an error is returned. All columns that
    /// have not been defined prior to this call are implicitly defined using the
    /// metadata made available when the statement was executed.
    /// 
    /// The function [`dpiStmt_fetchRows()`] should be used instead of this
    /// function if it is important to control when the internal fetch (and
    /// round-trip to the database) takes place.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiStmt_fetch(
        stmt: *mut dpiStmt,
        found: *mut ::std::os::raw::c_int,
        bufferRowIndex: *mut u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Returns the number of rows that are available in the buffers defined for
    /// the query. If no rows are currently available in the buffers, an internal
    /// fetch takes place in order to populate them, if rows are available. The
    /// number of rows fetched into the internal buffers can be set by calling
    /// [`dpiStmt_setFetchArraySize()`]. If the statement does not refer to a
    /// query an error is returned. All columns that have not been defined prior to
    /// this call are implicitly defined using the metadata made available when the
    /// statement was executed.
    /// 
    /// This function should be used instead of [`dpiStmt_fetch()`] if it is
    /// important to control when the internal fetch (and round-trip to the
    /// database) takes place.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiStmt_fetchRows(
        stmt: *mut dpiStmt,
        maxRows: u32,
        bufferRowIndex: *mut u32,
        numRowsFetched: *mut u32,
        moreRows: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the statement. A count of the references to the
    /// statement is maintained and when this count reaches zero, the memory
    /// associated with the statement is freed and the statement is closed if that
    /// has not already taken place using the function [`dpiStmt_close()`].
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiStmt_release(stmt: *mut dpiStmt) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Scrolls the statement to the position in the cursor specified by the mode
    /// and offset.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiStmt_scroll(
        stmt: *mut dpiStmt,
        mode: dpiFetchMode,
        offset: i32,
        rowCountOffset: i32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the subscription. A count of the references to the
    /// subscription is maintained and when this count reaches zero, the memory
    /// associated with the subscription is freed. The subscription is also
    /// deregistered so that notifications are no longer sent, if this was not
    /// already done using the function [`dpiConn_unsubscribe()`].
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiSubscr_release(subscr: *mut dpiSubscr) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Releases a reference to the variable. A count of the references to the
    /// variable is maintained and when this count reaches zero, the memory
    /// associated with the variable is freed.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiVar_release(var: *mut dpiVar) -> ::std::os::raw::c_int;
}
extern "C" {

    /// Sets the variable value to the specified byte string. In the case of the
    /// variable’s Oracle type being DPI_ORACLE_TYPE_NUMBER, the byte string is
    /// converted to an Oracle number during the call to this function.
    /// 
    /// The function returns DPI_SUCCESS for success and DPI_FAILURE for failure.
    pub fn dpiVar_setFromBytes(
        var: *mut dpiVar,
        pos: u32,
        value: *const ::std::os::raw::c_char,
        valueLength: u32,
    ) -> ::std::os::raw::c_int;
}