2
2
Initializes the MYSQL object. Must be called before mysql_real_connect.
3
3
Memory allocated by mysql_init can be freed with mysql_close.
4
4
"""
5
- function mysql_init (mysqlptr:: MYSQLPTR )
5
+ function mysql_init (mysqlptr:: MYSQL )
6
6
return ccall ((:mysql_init , mysql_lib),
7
7
Ptr{Void},
8
8
(Ptr{Cuchar}, ),
13
13
Used to connect to database server. Returns a MYSQL handle on success and
14
14
C_NULL on failure.
15
15
"""
16
- function mysql_real_connect (mysqlptr:: MYSQLPTR ,
16
+ function mysql_real_connect (mysqlptr:: MYSQL ,
17
17
host:: String ,
18
18
user:: String ,
19
19
passwd:: String ,
@@ -55,7 +55,7 @@ Used to set options. Must be called after mysql_init and before
55
55
mysql_real_connect. Can be called multiple times to set options.
56
56
Returns non zero on error.
57
57
"""
58
- function mysql_options (mysqlptr:: MYSQLPTR ,
58
+ function mysql_options (mysqlptr:: MYSQL ,
59
59
option_type:: Cuint ,
60
60
option:: Ptr{None} )
61
61
return ccall ((:mysql_options , mysql_lib),
71
71
"""
72
72
Close an opened MySQL connection.
73
73
"""
74
- function mysql_close (mysqlptr:: MYSQLPTR )
74
+ function mysql_close (mysqlptr:: MYSQL )
75
75
return ccall ((:mysql_close , mysql_lib),
76
76
Void,
77
77
(Ptr{Cuchar}, ),
81
81
"""
82
82
Returns the error number of the last API call.
83
83
"""
84
- function mysql_errno (mysqlptr:: MYSQLPTR )
84
+ function mysql_errno (mysqlptr:: MYSQL )
85
85
return ccall ((:mysql_errno , mysql_lib),
86
86
Cuint,
87
87
(Ptr{Cuchar}, ),
92
92
Returns a string of the last error message of the most recent function call.
93
93
If no error occured and empty string is returned.
94
94
"""
95
- function mysql_error (mysqlptr:: MYSQLPTR )
95
+ function mysql_error (mysqlptr:: MYSQL )
96
96
return ccall ((:mysql_error , mysql_lib),
97
97
Ptr{Cuchar},
98
98
(Ptr{Cuchar}, ),
123
123
Returns the value generated by auto increment column by the previous
124
124
insert / update statement.
125
125
"""
126
- function mysql_insert_id (mysqlptr:: MYSQLPTR )
126
+ function mysql_insert_id (mysqlptr:: MYSQL )
127
127
return ccall ((:mysql_insert_id , mysql_lib),
128
128
Culong,
129
129
(Ptr{Cuchar}, ),
133
133
"""
134
134
Creates the sql string where the special chars are escaped
135
135
"""
136
- function mysql_real_escape_string (mysqlptr:: MYSQLPTR ,
136
+ function mysql_real_escape_string (mysqlptr:: MYSQL ,
137
137
to:: Vector{Uint8} ,
138
138
from:: String ,
139
139
length:: Culong )
219
219
"""
220
220
Executes the query and returns the status of the same.
221
221
"""
222
- function mysql_query (mysqlptr:: MYSQLPTR , sql:: String )
222
+ function mysql_query (mysqlptr:: MYSQL , sql:: String )
223
223
return ccall ((:mysql_query , mysql_lib),
224
224
Int8,
225
225
(Ptr{Cuchar}, Ptr{Cuchar}),
@@ -298,25 +298,25 @@ function mysql_affected_rows(results::Ptr{Cuchar})
298
298
results)
299
299
end
300
300
301
- function mysql_autocommit (mysqlptr:: MYSQLPTR , mode:: Int8 )
301
+ function mysql_autocommit (mysqlptr:: MYSQL , mode:: Int8 )
302
302
return ccall ((:mysql_autocommit , mysql_lib),
303
303
Cchar, (Ptr{Void}, Cchar),
304
304
mysqlptr, mode)
305
305
end
306
306
307
- function mysql_change_user (mysqlptr:: MYSQLPTR , user:: String , passwd:: String ,
307
+ function mysql_change_user (mysqlptr:: MYSQL , user:: String , passwd:: String ,
308
308
db:: String = " " )
309
309
return ccall ((:mysql_change_user , mysql_lib),
310
310
Cchar, (Ptr{Void}, Cstring, Cstring, Cstring),
311
311
mysqlptr, user, passwd, (db == " " ? C_NULL : db))
312
312
end
313
313
314
- function mysql_character_set_name (mysqlptr:: MYSQLPTR )
314
+ function mysql_character_set_name (mysqlptr:: MYSQL )
315
315
return ccall ((:mysql_character_set_name , mysql_lib),
316
316
Cstring, (Ptr{Void},), mysqlptr)
317
317
end
318
318
319
- function mysql_commit (mysqlptr:: MYSQLPTR )
319
+ function mysql_commit (mysqlptr:: MYSQL )
320
320
return ccall ((:mysql_commit , mysql_lib), Cchar, (Ptr{Void},), mysqlptr)
321
321
end
322
322
@@ -326,7 +326,7 @@ function mysql_data_seek(result::MYSQL_RES, offset::Uint64)
326
326
result, offset- 1 )
327
327
end
328
328
329
- function mysql_dump_debug_info (mysqlptr:: MYSQLPTR )
329
+ function mysql_dump_debug_info (mysqlptr:: MYSQL )
330
330
return ccall ((:mysql_dump_debug_info , mysql_lib),
331
331
Cint, (Ptr{Void},), mysqlptr)
332
332
end
@@ -335,7 +335,7 @@ function mysql_fetch_lengths(result::MYSQL_RES)
335
335
return ccall ((:mysql_fetch_lengths , mysql_lib), Ptr{Cuint}, (Ptr{Void},), result)
336
336
end
337
337
338
- function mysql_field_count (mysqlptr:: MYSQLPTR )
338
+ function mysql_field_count (mysqlptr:: MYSQL )
339
339
return ccall ((:mysql_field_count , mysql_lib), Cuint, (Ptr{Void},), mysqlptr)
340
340
end
341
341
@@ -348,7 +348,7 @@ function mysql_field_tell(result::MYSQL_RES)
348
348
return ccall ((:mysql_field_tell , mysql_lib), Cuint, (Ptr{Void},), result)
349
349
end
350
350
351
- function mysql_get_character_set_info (mysqlptr:: MYSQLPTR )
351
+ function mysql_get_character_set_info (mysqlptr:: MYSQL )
352
352
info = _MY_CHARSET_INFO_[_MY_CHARSET_INFO_ ()]
353
353
ccall ((:mysql_get_character_set_info , mysql_lib), Void, (Ptr{Void}, Ref{_MY_CHARSET_INFO_}),
354
354
mysqlptr, info)
@@ -363,31 +363,31 @@ function mysql_get_client_version()
363
363
return ccall ((:mysql_get_client_version , mysql_lib), Culong, ())
364
364
end
365
365
366
- function mysql_get_host_info (mysqlptr:: MYSQLPTR )
366
+ function mysql_get_host_info (mysqlptr:: MYSQL )
367
367
return ccall ((:mysql_get_host_info , mysql_lib), Ptr{Uint8}, (Ptr{Void},), mysqlptr)
368
368
end
369
369
370
- function mysql_get_proto_info (mysqlptr:: MYSQLPTR )
370
+ function mysql_get_proto_info (mysqlptr:: MYSQL )
371
371
return ccall ((:mysql_get_proto_info , mysql_lib), Cuint, (Ptr{Void},), mysqlptr)
372
372
end
373
373
374
- function mysql_get_server_info (mysqlptr:: MYSQLPTR )
374
+ function mysql_get_server_info (mysqlptr:: MYSQL )
375
375
return ccall ((:mysql_get_server_info , mysql_lib), Ptr{Uint8}, (Ptr{Void},), mysqlptr)
376
376
end
377
377
378
- function mysql_get_server_version (mysqlptr:: MYSQLPTR )
378
+ function mysql_get_server_version (mysqlptr:: MYSQL )
379
379
return ccall ((:mysql_get_server_version , mysql_lib), Culong, (Ptr{Void},), mysqlptr)
380
380
end
381
381
382
- function mysql_get_ssl_cipher (mysqlptr:: MYSQLPTR )
382
+ function mysql_get_ssl_cipher (mysqlptr:: MYSQL )
383
383
return ccall ((:mysql_get_ssl_cipher , mysql_lib), Ptr{Uint8}, (Ptr{Void},), mysqlptr)
384
384
end
385
385
386
- function mysql_info (mysqlptr:: MYSQLPTR )
386
+ function mysql_info (mysqlptr:: MYSQL )
387
387
return ccall ((:mysql_info , mysql_lib), Ptr{Uint8}, (Ptr{Void},), mysqlptr)
388
388
end
389
389
390
- function mysql_kill (mysqlptr:: MYSQLPTR , pid:: Uint )
390
+ function mysql_kill (mysqlptr:: MYSQL , pid:: Uint )
391
391
return ccall ((:mysql_kill , mysql_lib), Cint, (PTr{Uint8}, Culong),
392
392
mysqlptr, pid)
393
393
end
@@ -408,35 +408,35 @@ function mysql_server_init()
408
408
0 , C_NULL , C_NULL )
409
409
end
410
410
411
- function mysql_more_results (mysqlptr:: MYSQLPTR )
411
+ function mysql_more_results (mysqlptr:: MYSQL )
412
412
retval = ccall ((:mysql_more_results , mysql_lib), Cchar, (Ptr{Void},), mysqlptr)
413
413
return retval == 1
414
414
end
415
415
416
- function mysql_next_result (mysqlptr:: MYSQLPTR )
416
+ function mysql_next_result (mysqlptr:: MYSQL )
417
417
return ccall ((:mysql_next_result , mysql_lib), Cint, (Ptr{Void},),
418
418
mysqlptr)
419
419
end
420
420
421
- function mysql_ping (mysqlptr:: MYSQLPTR )
421
+ function mysql_ping (mysqlptr:: MYSQL )
422
422
return ccall ((:mysql_ping , mysql_lib), Cint, (Ptr{Void},), mysqlptr)
423
423
end
424
424
425
- function mysql_real_query (mysqlptr:: MYSQLPTR , query:: Vector{Uint8} )
425
+ function mysql_real_query (mysqlptr:: MYSQL , query:: Vector{Uint8} )
426
426
return ccall ((:mysql_real_query , mysql_lib), Cint, (Ptr{Void}, Ptr{Uint8}, Culong),
427
427
mysqlptr, query, length (query))
428
428
end
429
429
430
- function mysql_real_query (mysqlptr:: MYSQLPTR , query:: Ptr{Cuchar} )
430
+ function mysql_real_query (mysqlptr:: MYSQL , query:: Ptr{Cuchar} )
431
431
return mysql_real_query (mysqlptr, query)
432
432
end
433
433
434
- function mysql_refresh (mysqlptr:: MYSQLPTR , options:: Uint32 )
434
+ function mysql_refresh (mysqlptr:: MYSQL , options:: Uint32 )
435
435
return ccall ((:mysql_refresh , mysql_lib), Cchar,
436
436
(Ptr{Void}, Cuint), mysqlptr, options)
437
437
end
438
438
439
- function mysql_rollback (mysqlptr:: MYSQLPTR )
439
+ function mysql_rollback (mysqlptr:: MYSQL )
440
440
return ccall ((:mysql_rollback , mysql_lib), Cchar, (Ptr{Void},), mysqlptr)
441
441
end
442
442
@@ -449,39 +449,39 @@ function mysql_row_tell(result::MYSQL_RES)
449
449
result)
450
450
end
451
451
452
- function mysql_select_db (mysqlptr:: MYSQLPTR , db:: String )
452
+ function mysql_select_db (mysqlptr:: MYSQL , db:: String )
453
453
return ccall ((:mysql_select_db , mysql_lib),
454
454
Cint, (Ptr{Void}, Ptr{Void}), mysqlptr, db)
455
455
end
456
456
457
- function mysql_set_character_set (mysqlptr:: MYSQLPTR , csname:: String )
457
+ function mysql_set_character_set (mysqlptr:: MYSQL , csname:: String )
458
458
return ccall ((:mysql_set_character_set , mysql_lib), Cint, (Ptr{Void}, Ptr{Void}), mysqlptr, csname)
459
459
end
460
460
461
- function mysql_set_server_option (mysqlptr:: MYSQLPTR , option:: Uint32 )
461
+ function mysql_set_server_option (mysqlptr:: MYSQL , option:: Uint32 )
462
462
return ccall ((:mysql_set_server_option , mysql_lib), Cint, (Ptr{Void}, Cint), mysqlptr, option)
463
463
end
464
464
465
- function mysql_sqlstate (mysqlptr:: MYSQLPTR )
465
+ function mysql_sqlstate (mysqlptr:: MYSQL )
466
466
return ccall ((:mysql_sqlstate , mysql_lib), Ptr{Uint8}, (Ptr{Void},), mysqlptr)
467
467
end
468
468
469
- function mysql_ssl_set (mysqlptr:: MYSQLPTR , key:: Ptr{Uint8} = C_NULL , cert:: Ptr{Uint8} = C_NULL , ca:: Ptr{Uint8} = C_NULL ,
469
+ function mysql_ssl_set (mysqlptr:: MYSQL , key:: Ptr{Uint8} = C_NULL , cert:: Ptr{Uint8} = C_NULL , ca:: Ptr{Uint8} = C_NULL ,
470
470
capath:: Ptr{Uint8} = C_NULL , cipher:: Ptr{Uint8} = C_NULL )
471
471
return ccall ((:mysql_ssl_set , mysql_lib),
472
472
Cchar, (Ptr{Void}, Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}),
473
473
mysqlptr, key, cert, ca, capath, cipher)
474
474
end
475
475
476
- function mysql_stat (mysqlptr:: MYSQLPTR )
476
+ function mysql_stat (mysqlptr:: MYSQL )
477
477
return ccall ((:mysql_stat , mysql_lib), Ptr{Uint8}, (Ptr{Void},), mysqlptr)
478
478
end
479
479
480
480
function mysql_thread_end ()
481
481
return ccall ((:mysql_thread_end , mysql_lib), Void, ())
482
482
end
483
483
484
- function mysql_thread_id (mysqlptr:: MYSQLPTR )
484
+ function mysql_thread_id (mysqlptr:: MYSQL )
485
485
return ccall ((:mysql_thread_id , mysql_lib), Culong, (Ptr{Void},), mysqlptr)
486
486
end
487
487
@@ -493,12 +493,12 @@ function mysql_thread_safe()
493
493
return ccall ((:mysql_thread_safe , mysql_lib), Cint, ())
494
494
end
495
495
496
- function mysql_use_result (mysqlptr:: MYSQLPTR )
496
+ function mysql_use_result (mysqlptr:: MYSQL )
497
497
return ccall ((:mysql_use_result , mysql_lib), Ptr{Void}, (Ptr{Void},),
498
498
mysqlptr)
499
499
end
500
500
501
- function mysql_warning_count (mysqlptr:: MYSQLPTR )
501
+ function mysql_warning_count (mysqlptr:: MYSQL )
502
502
return ccall ((:mysql_warning_count , mysql_lib), Cuint, (Ptr{Void},),
503
503
mysqlptr)
504
504
end
0 commit comments