1
1
# DB2 for i Access APIs - idb-connector
2
2
3
-
4
- [ // ] : # ( TOC built in macro on BB makes table of contents )
5
- [ TOC]
3
+ - [ DB2 for i Access APIs - idb-connector] ( #db2-for-i-access-apis---idb-connector )
4
+ - [ Introduction] ( #introduction )
5
+ - [ Install] ( #install )
6
+ - [ Examples] ( #examples )
7
+ - [ Async Exec] ( #async-exec )
8
+ - [ Sync Exec] ( #sync-exec )
9
+ - [ Async Prepare Bind Execute] ( #async-prepare-bind-execute )
10
+ - [ Sync Prepare Bind Execute] ( #sync-prepare-bind-execute )
11
+ - [ Async Fetch] ( #async-fetch )
12
+ - [ Sync Fetch] ( #sync-fetch )
13
+ - [ Async FetchAll] ( #async-fetchall )
14
+ - [ Sync FetchAll] ( #sync-fetchall )
15
+ - [ Class: dbconn] ( #class-dbconn )
16
+ - [ Contructor: dbconn()] ( #contructor-dbconn )
17
+ - [ dbconn.setConnAttr(attribute, value)] ( #dbconnsetconnattrattribute-value )
18
+ - [ dbconn.getConnAttr(attribute)] ( #dbconngetconnattrattribute )
19
+ - [ dbconn.conn(database)] ( #dbconnconndatabase )
20
+ - [ dbconn.disconn()] ( #dbconndisconn )
21
+ - [ dbconn.close()] ( #dbconnclose )
22
+ - [ dbconn.debug(flag)] ( #dbconndebugflag )
23
+ - [ dbconn.validStmt(sql)] ( #dbconnvalidstmtsql )
24
+ - [ Class dbstmt] ( #class-dbstmt )
25
+ - [ Constructor: dbstmt(connection)] ( #constructor-dbstmtconnection )
26
+ - [ dbstmt.setStmtAttr(attribute, value)] ( #dbstmtsetstmtattrattribute-value )
27
+ - [ dbstmt.getStmtAttr()] ( #dbstmtgetstmtattr )
28
+ - [ dbstmt.exec(sql, callback)] ( #dbstmtexecsql-callback )
29
+ - [ dbstmt.execSync(sql [ , callback] )] ( #dbstmtexecsyncsql--callback )
30
+ - [ dbstmt.prepare(sql, callback)] ( #dbstmtpreparesql-callback )
31
+ - [ dbstmt.prepareSync(sql [ , callback] )] ( #dbstmtpreparesyncsql--callback )
32
+ - [ dbstmt.bindParam(params, callback)] ( #dbstmtbindparamparams-callback )
33
+ - [ dbstmt.bindParamSync(params [ , callback] )] ( #dbstmtbindparamsyncparams--callback )
34
+ - [ dbstmt.execute(callback)] ( #dbstmtexecutecallback )
35
+ - [ dbstmt.executeSync([ callback] )] ( #dbstmtexecutesynccallback )
36
+ - [ dbstmt.nextResult()] ( #dbstmtnextresult )
37
+ - [ dbstmt.commit()] ( #dbstmtcommit )
38
+ - [ dbstmt.rollback()] ( #dbstmtrollback )
39
+ - [ dbstmt.closeCursor()] ( #dbstmtclosecursor )
40
+ - [ dbstmt.close()] ( #dbstmtclose )
41
+ - [ dbstmt.fetch([ orient,] [ offset,] callback)] ( #dbstmtfetchorient-offset-callback )
42
+ - [ dbstmt.fetchSync()] ( #dbstmtfetchsync )
43
+ - [ dbstmt.fetchAll(callback)] ( #dbstmtfetchallcallback )
44
+ - [ dbstmt.fetchAllSync([ callback] )] ( #dbstmtfetchallsynccallback )
45
+ - [ dbstmt.numFields()] ( #dbstmtnumfields )
46
+ - [ dbstmt.numRows()] ( #dbstmtnumrows )
47
+ - [ dbstmt.fieldType(index)] ( #dbstmtfieldtypeindex )
48
+ - [ dbstmt.fieldWidth(index)] ( #dbstmtfieldwidthindex )
49
+ - [ dbstmt.fieldNullable(index)] ( #dbstmtfieldnullableindex )
50
+ - [ dbstmt.fieldName(index)] ( #dbstmtfieldnameindex )
51
+ - [ dbstmt.fieldPrecise(index)] ( #dbstmtfieldpreciseindex )
52
+ - [ dbstmt.fieldScale(index)] ( #dbstmtfieldscaleindex )
53
+ - [ dbstmt.stmtError(callback)] ( #dbstmtstmterrorcallback )
6
54
___
7
55
# Introduction
8
56
18
66
19
67
Build from source
20
68
21
- - ` git clone https://bitbucket.org/litmis /nodejs-idb-connector.git `
69
+ - ` git clone https://github.com/IBM /nodejs-idb-connector.git `
22
70
- ` cd nodejs-idb-connector `
23
71
- ` npm install --build-from-source `
24
72
___
25
73
# Examples
26
- [ // ] : # ( On BB headers are prefixed by #markdown-header )
27
- [ // ] : # ( Also the title of the header are made lower case )
28
- [ // ] : # ( So to link to Async Exec header: #markdown-header-async-exec )
74
+
29
75
### Async Exec
30
76
31
77
@@ -553,7 +599,7 @@ setStmtAttr(attribute, value)
553
599
** Valid Scope:** After allocating the statement handler.
554
600
___
555
601
556
- ## dbstmt.getStmtAttr
602
+ ## dbstmt.getStmtAttr()
557
603
558
604
** Description:**
559
605
@@ -602,7 +648,7 @@ exec(sql,callback)
602
648
603
649
** Valid Scope:** After calling the ` conn ` function.
604
650
605
- ** Example:** [ Here] ( #markdown-header- async-exec )
651
+ ** Example:** [ Here] ( #async-exec )
606
652
607
653
___
608
654
@@ -648,7 +694,7 @@ execSync(sql, callback(resultSet, error))
648
694
649
695
** Valid Scope:** After calling the conn() function.
650
696
651
- ** Example:** [ Here] ( #markdown-header- sync-exec )
697
+ ** Example:** [ Here] ( #sync-exec )
652
698
653
699
___
654
700
@@ -684,7 +730,7 @@ If the statement handler has been used with a SELECT statement,
684
730
685
731
- Before calling the execute() or bindParam() function.
686
732
687
- ** Example:** [ Here] ( #markdown-header- async-prepare-bind-execute )
733
+ ** Example:** [ Here] ( #async-prepare-bind-execute )
688
734
___
689
735
690
736
## dbstmt.prepareSync(sql [ , callback] )
@@ -730,7 +776,7 @@ If the statement handler has been used with a SELECT statement
730
776
731
777
- Before calling the ` executeSync ` or ` bindParamSync ` function.
732
778
733
- ** Example:** [ Here] ( #markdown-header- sync-prepare-bind-execute )
779
+ ** Example:** [ Here] ( #sync-prepare-bind-execute )
734
780
735
781
___
736
782
@@ -787,7 +833,7 @@ bindParam(params, callback)
787
833
788
834
** Valid Scope:** In the callback function of the ` prepare ` function.
789
835
790
- ** Example:** [ Here] ( #markdown-header- async-prepare-bind-execute )
836
+ ** Example:** [ Here] ( #async-prepare-bind-execute )
791
837
792
838
___
793
839
@@ -803,7 +849,7 @@ bindParamSync(params)
803
849
804
850
** Parmeters:**
805
851
806
- - ** params** : as described in [ bindParam] ( #dbstmt.bindParam() )
852
+ - ** params** : as described in [ bindParam] ( #dbstmtbindparamparams-callback )
807
853
808
854
** Returns:**
809
855
@@ -815,14 +861,14 @@ bindParamSync(params, callback)
815
861
816
862
** Parameters**
817
863
818
- - ** params** : as described in [ bindParam() ] ( #dbstmt.bindParam() )
864
+ - ** params** : as described in [ bindParam] ( #dbstmtbindparamparams-callback )
819
865
820
866
821
867
- ** callback(error)** : ` function ` to process after ` bindParamSync ` is complete.
822
868
- ** error** : ` Error object ` when ` bindParamSync ` is unsuccessful. Otherwise ` error ` is set to ` null ` .
823
869
824
870
825
- ** Example:** [ Here] ( #markdown-header- sync-prepare-bind-execute )
871
+ ** Example:** [ Here] ( #sync-prepare-bind-execute )
826
872
827
873
** DB2 CLI API:** SQLBindParameter
828
874
@@ -856,7 +902,7 @@ execute(callback(outputParams, error))
856
902
857
903
** Valid Scope:** In the callback function of the ` prepare ` or ` bindParam ` function.
858
904
859
- ** Example:** [ Here] ( #markdown-header- async-prepare-bind-execute )
905
+ ** Example:** [ Here] ( #async-prepare-bind-execute )
860
906
861
907
___
862
908
@@ -894,7 +940,7 @@ If the statement also returns a result set, user can issue the `fetch` function
894
940
895
941
** Valid Scope:** After calling the prepareSync() function.
896
942
897
- ** Example:** [ Here] ( #markdown-header- sync-prepare-bind-execute )
943
+ ** Example:** [ Here] ( #sync-prepare-bind-execute )
898
944
___
899
945
900
946
## dbstmt.nextResult()
@@ -1059,7 +1105,7 @@ fetch(orient, offset, callback)
1059
1105
1060
1106
** Valid Scope:** When the result set is available.
1061
1107
1062
- ** Example:** [ Here] ( #markdown-header- async-fetch )
1108
+ ** Example:** [ Here] ( #async-fetch )
1063
1109
1064
1110
___
1065
1111
@@ -1100,7 +1146,7 @@ fetchSync(int Orient, int Offset, function Callback(Row))
1100
1146
1101
1147
** Valid Scope:** When the result set is available.
1102
1148
1103
- ** Example:** [ Here] ( #markdown-header- sync-fetch )
1149
+ ** Example:** [ Here] ( #sync-fetch )
1104
1150
1105
1151
## dbstmt.fetchAll(callback)
1106
1152
@@ -1124,7 +1170,7 @@ fetchAll(callback)
1124
1170
1125
1171
** Valid Scope:** When the result set is available.
1126
1172
1127
- ** Example:** [ Here] ( #markdown-header- async-fetchAll )
1173
+ ** Example:** [ Here] ( #async-fetchAll )
1128
1174
___
1129
1175
1130
1176
## dbstmt.fetchAllSync([ callback] )
@@ -1154,7 +1200,7 @@ fetchAllSync(callback)
1154
1200
1155
1201
- ** error** : ` Error object ` when ` fetchAllSync ` is unsuccessful. Otherwise ` error ` is set to ` null ` .
1156
1202
1157
- ** Example:** [ Here] ( #markdown-header- sync-fetchAll )
1203
+ ** Example:** [ Here] ( #sync-fetchAll )
1158
1204
1159
1205
1160
1206
** DB2 CLI API:** SQLFetch
0 commit comments