/
JdbcConnection.purs
450 lines (241 loc) · 17 KB
/
JdbcConnection.purs
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
module Control.Google.Apps.Jdbc.JdbcConnection (
clearWarnings,
close,
commit,
createArrayOf,
createBlob,
createClob,
createNClob,
createSqlxml,
createStatement,
createStatementWithIntegerInteger,
createStatementWithIntegerIntegerInteger,
createStruct,
getAutoCommit,
getCatalog,
getHoldability,
getMetaData,
getTransactionIsolation,
getWarnings,
isClosed,
isReadOnly,
isValid,
nativeSql,
prepareCallWithString,
prepareCallWithStringIntegerInteger,
prepareCallWithStringIntegerIntegerInteger,
prepareStatementWithString,
prepareStatementWithStringInteger,
prepareStatementWithStringIntegerInteger,
prepareStatementWithStringIntegerIntegerInteger,
prepareStatementByIndex,
prepareStatementByName,
releaseSavepoint,
rollback,
rollbackWithJdbcsavepoint,
setAutoCommit,
setCatalog,
setHoldability,
setReadOnly,
setSavepoint,
setSavepointWithString,
setTransactionIsolation
) where
import Prelude (Unit)
import Effect (Effect)
import Foreign (Foreign)
import Data.Google.Apps.Jdbc.JdbcSavepoint as JdbcJdbcSavepoint
import Data.Google.Apps.Jdbc.JdbcArray as JdbcJdbcArray
import Data.Google.Apps.Jdbc.JdbcBlob as JdbcJdbcBlob
import Data.Google.Apps.Jdbc.JdbcClob as JdbcJdbcClob
import Data.Google.Apps.Jdbc.JdbcSqlxml as JdbcJdbcSqlxml
import Data.Google.Apps.Jdbc.JdbcStatement as JdbcJdbcStatement
import Data.Google.Apps.Jdbc.JdbcStruct as JdbcJdbcStruct
import Data.Google.Apps.Jdbc.JdbcDatabaseMetaData as JdbcJdbcDatabaseMetaData
import Data.Google.Apps.Jdbc.JdbcCallableStatement as JdbcJdbcCallableStatement
import Data.Google.Apps.Jdbc.JdbcPreparedStatement as JdbcJdbcPreparedStatement
import Data.Google.Apps.Jdbc.JdbcConnection as JdbcJdbcConnection
foreign import clearWarningsImpl :: JdbcJdbcConnection.JdbcConnection -> Effect Unit
-- | For documentation of this method, see java.sql.Connection#clearWarnings().
clearWarnings :: JdbcJdbcConnection.JdbcConnection -> Effect Unit
clearWarnings p' = clearWarningsImpl p'
foreign import closeImpl :: JdbcJdbcConnection.JdbcConnection -> Effect Unit
-- | Release this connection's database and all associated resources.
close :: JdbcJdbcConnection.JdbcConnection -> Effect Unit
close p' = closeImpl p'
foreign import commitImpl :: JdbcJdbcConnection.JdbcConnection -> Effect Unit
-- | Makes all pending changes permanent, releases database locks held by this
-- | JdbcConnection.
commit :: JdbcJdbcConnection.JdbcConnection -> Effect Unit
commit p' = commitImpl p'
foreign import createArrayOfImpl :: String -> (Array Foreign) -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcArray.JdbcArray
-- | For documentation of this method, see
-- | java.sql.Connection#createArrayOf(String, Object[]).
createArrayOf :: String -> (Array Foreign) -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcArray.JdbcArray
createArrayOf typeName elements p' = createArrayOfImpl typeName elements p'
foreign import createBlobImpl :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcBlob.JdbcBlob
-- | Constructs a JdbcBlob instance.
createBlob :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcBlob.JdbcBlob
createBlob p' = createBlobImpl p'
foreign import createClobImpl :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcClob.JdbcClob
-- | For documentation of this method, see java.sql.Connection#createClob().
createClob :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcClob.JdbcClob
createClob p' = createClobImpl p'
foreign import createNClobImpl :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcClob.JdbcClob
-- | For documentation of this method, see java.sql.Connection#createNClob().
createNClob :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcClob.JdbcClob
createNClob p' = createNClobImpl p'
foreign import createSqlxmlImpl :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcSqlxml.JdbcSqlxml
-- | For documentation of this method, see java.sql.Connection#createSQLXML().
createSqlxml :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcSqlxml.JdbcSqlxml
createSqlxml p' = createSqlxmlImpl p'
foreign import createStatementImpl :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcStatement.JdbcStatement
-- | Creates a JdbcStatement object for sending SQL statements to the database.
createStatement :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcStatement.JdbcStatement
createStatement p' = createStatementImpl p'
foreign import createStatementWithIntegerIntegerImpl :: Int -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcStatement.JdbcStatement
-- | Creates a JdbcStatement object for sending SQL statements to the database.
createStatementWithIntegerInteger :: Int -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcStatement.JdbcStatement
createStatementWithIntegerInteger resultSetType resultSetConcurrency p' = createStatementWithIntegerIntegerImpl resultSetType resultSetConcurrency p'
foreign import createStatementWithIntegerIntegerIntegerImpl :: Int -> Int -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcStatement.JdbcStatement
-- | Creates a JdbcStatement object for sending SQL statements to the database.
createStatementWithIntegerIntegerInteger :: Int -> Int -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcStatement.JdbcStatement
createStatementWithIntegerIntegerInteger resultSetType resultSetConcurrency resultSetHoldability p' = createStatementWithIntegerIntegerIntegerImpl resultSetType resultSetConcurrency resultSetHoldability p'
foreign import createStructImpl :: String -> (Array Foreign) -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcStruct.JdbcStruct
-- | For documentation of this method, see
-- | java.sql.Connection#createStruct(String, Object[]).
createStruct :: String -> (Array Foreign) -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcStruct.JdbcStruct
createStruct typeName attributes p' = createStructImpl typeName attributes p'
foreign import getAutoCommitImpl :: JdbcJdbcConnection.JdbcConnection -> Effect Boolean
-- | For documentation of this method, see java.sql.Connection#getAutoCommit().
getAutoCommit :: JdbcJdbcConnection.JdbcConnection -> Effect Boolean
getAutoCommit p' = getAutoCommitImpl p'
foreign import getCatalogImpl :: JdbcJdbcConnection.JdbcConnection -> Effect String
-- | Or documentation of this method, see java.sql.Connection#getCatalog().
getCatalog :: JdbcJdbcConnection.JdbcConnection -> Effect String
getCatalog p' = getCatalogImpl p'
foreign import getHoldabilityImpl :: JdbcJdbcConnection.JdbcConnection -> Effect Int
-- | For documentation of this method, see java.sql.Connection#getHoldability().
getHoldability :: JdbcJdbcConnection.JdbcConnection -> Effect Int
getHoldability p' = getHoldabilityImpl p'
foreign import getMetaDataImpl :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcDatabaseMetaData.JdbcDatabaseMetaData
-- | For documentation of this method, see java.sql.Connection#getMetaData().
getMetaData :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcDatabaseMetaData.JdbcDatabaseMetaData
getMetaData p' = getMetaDataImpl p'
foreign import getTransactionIsolationImpl :: JdbcJdbcConnection.JdbcConnection -> Effect Int
-- | For documentation of this method, see
-- | java.sql.Connection#getTransactionIsolation().
getTransactionIsolation :: JdbcJdbcConnection.JdbcConnection -> Effect Int
getTransactionIsolation p' = getTransactionIsolationImpl p'
foreign import getWarningsImpl :: JdbcJdbcConnection.JdbcConnection -> Effect (Array String)
-- | For documentation of this method, see java.sql.Connection#getWarnings().
getWarnings :: JdbcJdbcConnection.JdbcConnection -> Effect (Array String)
getWarnings p' = getWarningsImpl p'
foreign import isClosedImpl :: JdbcJdbcConnection.JdbcConnection -> Effect Boolean
-- | For documentation of this method, see java.sql.Connection#isClosed().
isClosed :: JdbcJdbcConnection.JdbcConnection -> Effect Boolean
isClosed p' = isClosedImpl p'
foreign import isReadOnlyImpl :: JdbcJdbcConnection.JdbcConnection -> Effect Boolean
-- | For documentation of this method, see java.sql.Connection#isReadOnly().
isReadOnly :: JdbcJdbcConnection.JdbcConnection -> Effect Boolean
isReadOnly p' = isReadOnlyImpl p'
foreign import isValidImpl :: Int -> JdbcJdbcConnection.JdbcConnection -> Effect Boolean
-- | For documentation of this method, see java.sql.Connection#isValid(int).
isValid :: Int -> JdbcJdbcConnection.JdbcConnection -> Effect Boolean
isValid timeout p' = isValidImpl timeout p'
foreign import nativeSqlImpl :: String -> JdbcJdbcConnection.JdbcConnection -> Effect String
-- | For documentation of this method, see java.sql.Connection#nativeSQL(String).
nativeSql :: String -> JdbcJdbcConnection.JdbcConnection -> Effect String
nativeSql sql p' = nativeSqlImpl sql p'
foreign import prepareCallWithStringImpl :: String -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcCallableStatement.JdbcCallableStatement
-- | For documentation of this method, see
-- | java.sql.Connection#prepareCall(String).
prepareCallWithString :: String -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcCallableStatement.JdbcCallableStatement
prepareCallWithString sql p' = prepareCallWithStringImpl sql p'
foreign import prepareCallWithStringIntegerIntegerImpl :: String -> Int -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcCallableStatement.JdbcCallableStatement
-- | For documentation of this method, see java.sql.Connection#prepareCall(String,
-- | int, int).
prepareCallWithStringIntegerInteger :: String -> Int -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcCallableStatement.JdbcCallableStatement
prepareCallWithStringIntegerInteger sql resultSetType resultSetConcurrency p' = prepareCallWithStringIntegerIntegerImpl sql resultSetType resultSetConcurrency p'
foreign import prepareCallWithStringIntegerIntegerIntegerImpl :: String -> Int -> Int -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcCallableStatement.JdbcCallableStatement
-- | For documentation of this method, see java.sql.Connection#prepareCall(String,
-- | int, int, int).
prepareCallWithStringIntegerIntegerInteger :: String -> Int -> Int -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcCallableStatement.JdbcCallableStatement
prepareCallWithStringIntegerIntegerInteger sql resultSetType resultSetConcurrency resultSetHoldability p' = prepareCallWithStringIntegerIntegerIntegerImpl sql resultSetType resultSetConcurrency resultSetHoldability p'
foreign import prepareStatementWithStringImpl :: String -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcPreparedStatement.JdbcPreparedStatement
-- | For documentation of this method, see
-- | java.sql.Connection#prepareStatement(String).
prepareStatementWithString :: String -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcPreparedStatement.JdbcPreparedStatement
prepareStatementWithString sql p' = prepareStatementWithStringImpl sql p'
foreign import prepareStatementWithStringIntegerImpl :: String -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcPreparedStatement.JdbcPreparedStatement
-- | For documentation of this method, see
-- | java.sql.Connection#prepareStatement(String, int).
prepareStatementWithStringInteger :: String -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcPreparedStatement.JdbcPreparedStatement
prepareStatementWithStringInteger sql autoGeneratedKeys p' = prepareStatementWithStringIntegerImpl sql autoGeneratedKeys p'
foreign import prepareStatementWithStringIntegerIntegerImpl :: String -> Int -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcPreparedStatement.JdbcPreparedStatement
-- | For documentation of this method, see
-- | java.sql.Connection#prepareStatement(String, int, int).
prepareStatementWithStringIntegerInteger :: String -> Int -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcPreparedStatement.JdbcPreparedStatement
prepareStatementWithStringIntegerInteger sql resultSetType resultSetConcurrency p' = prepareStatementWithStringIntegerIntegerImpl sql resultSetType resultSetConcurrency p'
foreign import prepareStatementWithStringIntegerIntegerIntegerImpl :: String -> Int -> Int -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcPreparedStatement.JdbcPreparedStatement
-- | For documentation of this method, see
-- | java.sql.Connection#prepareStatement(String, int, int, int).
prepareStatementWithStringIntegerIntegerInteger :: String -> Int -> Int -> Int -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcPreparedStatement.JdbcPreparedStatement
prepareStatementWithStringIntegerIntegerInteger sql resultSetType resultSetConcurrency resultSetHoldability p' = prepareStatementWithStringIntegerIntegerIntegerImpl sql resultSetType resultSetConcurrency resultSetHoldability p'
foreign import prepareStatementByIndexImpl :: String -> (Array Int) -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcPreparedStatement.JdbcPreparedStatement
-- | For documentation of this method, see
-- | java.sql.Connection#prepareStatement(String, int[]).
prepareStatementByIndex :: String -> (Array Int) -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcPreparedStatement.JdbcPreparedStatement
prepareStatementByIndex sql indices p' = prepareStatementByIndexImpl sql indices p'
foreign import prepareStatementByNameImpl :: String -> (Array String) -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcPreparedStatement.JdbcPreparedStatement
-- | For documentation of this method, see
-- | java.sql.Connection#prepareStatement(String, String[]).
prepareStatementByName :: String -> (Array String) -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcPreparedStatement.JdbcPreparedStatement
prepareStatementByName sql columnNames p' = prepareStatementByNameImpl sql columnNames p'
foreign import releaseSavepointImpl :: JdbcJdbcSavepoint.JdbcSavepoint -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
-- | For documentation of this method, see
-- | java.sql.Connection#releaseSavepoint(Savepoint).
releaseSavepoint :: JdbcJdbcSavepoint.JdbcSavepoint -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
releaseSavepoint savepoint p' = releaseSavepointImpl savepoint p'
foreign import rollbackImpl :: JdbcJdbcConnection.JdbcConnection -> Effect Unit
-- | For documentation of this method, see java.sql.Connection#rollback().
rollback :: JdbcJdbcConnection.JdbcConnection -> Effect Unit
rollback p' = rollbackImpl p'
foreign import rollbackWithJdbcsavepointImpl :: JdbcJdbcSavepoint.JdbcSavepoint -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
-- | For documentation of this method, see
-- | java.sql.Connection#rollback(Savepoint).
rollbackWithJdbcsavepoint :: JdbcJdbcSavepoint.JdbcSavepoint -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
rollbackWithJdbcsavepoint savepoint p' = rollbackWithJdbcsavepointImpl savepoint p'
foreign import setAutoCommitImpl :: Boolean -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
-- | For documentation of this method, see
-- | java.sql.Connection#setAutoCommit(boolean).
setAutoCommit :: Boolean -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
setAutoCommit autoCommit p' = setAutoCommitImpl autoCommit p'
foreign import setCatalogImpl :: String -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
-- | For documentation of this method, see java.sql.Connection#setCatalog(String).
setCatalog :: String -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
setCatalog catalog p' = setCatalogImpl catalog p'
foreign import setHoldabilityImpl :: Int -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
-- | For documentation of this method, see
-- | java.sql.Connection#setHoldability(int).
setHoldability :: Int -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
setHoldability holdability p' = setHoldabilityImpl holdability p'
foreign import setReadOnlyImpl :: Boolean -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
-- | For documentation of this method, see
-- | java.sql.Connection#setReadOnly(boolean).
setReadOnly :: Boolean -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
setReadOnly readOnly p' = setReadOnlyImpl readOnly p'
foreign import setSavepointImpl :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcSavepoint.JdbcSavepoint
-- | For documentation of this method, see java.sql.Connection#setSavepoint().
setSavepoint :: JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcSavepoint.JdbcSavepoint
setSavepoint p' = setSavepointImpl p'
foreign import setSavepointWithStringImpl :: String -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcSavepoint.JdbcSavepoint
-- | For documentation of this method, see
-- | java.sql.Connection#setSavepoint(String).
setSavepointWithString :: String -> JdbcJdbcConnection.JdbcConnection -> Effect JdbcJdbcSavepoint.JdbcSavepoint
setSavepointWithString name p' = setSavepointWithStringImpl name p'
foreign import setTransactionIsolationImpl :: Int -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
-- | For documentation of this method, see
-- | java.sql.Connection#setTransactionIsolation(int).
setTransactionIsolation :: Int -> JdbcJdbcConnection.JdbcConnection -> Effect Unit
setTransactionIsolation level p' = setTransactionIsolationImpl level p'