mirror of
https://github.com/vlang/v.git
synced 2025-09-16 16:02:29 +03:00
all: unwrap const() blocks
This commit is contained in:
parent
399af6768d
commit
f09826e928
436 changed files with 10448 additions and 11207 deletions
|
@ -2,13 +2,11 @@ module mysql
|
|||
|
||||
// MySQL refresh flags.
|
||||
// Docs: https://dev.mysql.com/doc/c-api/8.0/en/mysql-refresh.html
|
||||
pub const (
|
||||
refresh_grant = u32(C.REFRESH_GRANT)
|
||||
refresh_log = u32(C.REFRESH_LOG)
|
||||
refresh_tables = u32(C.REFRESH_TABLES)
|
||||
refresh_hosts = u32(C.REFRESH_HOSTS)
|
||||
refresh_status = u32(C.REFRESH_STATUS)
|
||||
refresh_threads = u32(C.REFRESH_THREADS)
|
||||
refresh_slave = u32(C.REFRESH_SLAVE)
|
||||
refresh_master = u32(C.REFRESH_MASTER)
|
||||
)
|
||||
pub const refresh_grant = u32(C.REFRESH_GRANT)
|
||||
pub const refresh_log = u32(C.REFRESH_LOG)
|
||||
pub const refresh_tables = u32(C.REFRESH_TABLES)
|
||||
pub const refresh_hosts = u32(C.REFRESH_HOSTS)
|
||||
pub const refresh_status = u32(C.REFRESH_STATUS)
|
||||
pub const refresh_threads = u32(C.REFRESH_THREADS)
|
||||
pub const refresh_slave = u32(C.REFRESH_SLAVE)
|
||||
pub const refresh_master = u32(C.REFRESH_MASTER)
|
||||
|
|
|
@ -15,37 +15,35 @@ mut:
|
|||
length &u32
|
||||
}
|
||||
|
||||
const (
|
||||
mysql_type_decimal = C.MYSQL_TYPE_DECIMAL
|
||||
mysql_type_tiny = C.MYSQL_TYPE_TINY
|
||||
mysql_type_short = C.MYSQL_TYPE_SHORT
|
||||
mysql_type_long = C.MYSQL_TYPE_LONG
|
||||
mysql_type_float = C.MYSQL_TYPE_FLOAT
|
||||
mysql_type_double = C.MYSQL_TYPE_DOUBLE
|
||||
mysql_type_null = C.MYSQL_TYPE_NULL
|
||||
mysql_type_timestamp = C.MYSQL_TYPE_TIMESTAMP
|
||||
mysql_type_longlong = C.MYSQL_TYPE_LONGLONG
|
||||
mysql_type_int24 = C.MYSQL_TYPE_INT24
|
||||
mysql_type_date = C.MYSQL_TYPE_DATE
|
||||
mysql_type_time = C.MYSQL_TYPE_TIME
|
||||
mysql_type_datetime = C.MYSQL_TYPE_DATETIME
|
||||
mysql_type_year = C.MYSQL_TYPE_YEAR
|
||||
mysql_type_varchar = C.MYSQL_TYPE_VARCHAR
|
||||
mysql_type_bit = C.MYSQL_TYPE_BIT
|
||||
mysql_type_timestamp22 = C.MYSQL_TYPE_TIMESTAMP
|
||||
mysql_type_json = C.MYSQL_TYPE_JSON
|
||||
mysql_type_newdecimal = C.MYSQL_TYPE_NEWDECIMAL
|
||||
mysql_type_enum = C.MYSQL_TYPE_ENUM
|
||||
mysql_type_set = C.MYSQL_TYPE_SET
|
||||
mysql_type_tiny_blob = C.MYSQL_TYPE_TINY_BLOB
|
||||
mysql_type_medium_blob = C.MYSQL_TYPE_MEDIUM_BLOB
|
||||
mysql_type_long_blob = C.MYSQL_TYPE_LONG_BLOB
|
||||
mysql_type_blob = C.MYSQL_TYPE_BLOB
|
||||
mysql_type_var_string = C.MYSQL_TYPE_VAR_STRING
|
||||
mysql_type_string = C.MYSQL_TYPE_STRING
|
||||
mysql_type_geometry = C.MYSQL_TYPE_GEOMETRY
|
||||
mysql_no_data = C.MYSQL_NO_DATA
|
||||
)
|
||||
const mysql_type_decimal = C.MYSQL_TYPE_DECIMAL
|
||||
const mysql_type_tiny = C.MYSQL_TYPE_TINY
|
||||
const mysql_type_short = C.MYSQL_TYPE_SHORT
|
||||
const mysql_type_long = C.MYSQL_TYPE_LONG
|
||||
const mysql_type_float = C.MYSQL_TYPE_FLOAT
|
||||
const mysql_type_double = C.MYSQL_TYPE_DOUBLE
|
||||
const mysql_type_null = C.MYSQL_TYPE_NULL
|
||||
const mysql_type_timestamp = C.MYSQL_TYPE_TIMESTAMP
|
||||
const mysql_type_longlong = C.MYSQL_TYPE_LONGLONG
|
||||
const mysql_type_int24 = C.MYSQL_TYPE_INT24
|
||||
const mysql_type_date = C.MYSQL_TYPE_DATE
|
||||
const mysql_type_time = C.MYSQL_TYPE_TIME
|
||||
const mysql_type_datetime = C.MYSQL_TYPE_DATETIME
|
||||
const mysql_type_year = C.MYSQL_TYPE_YEAR
|
||||
const mysql_type_varchar = C.MYSQL_TYPE_VARCHAR
|
||||
const mysql_type_bit = C.MYSQL_TYPE_BIT
|
||||
const mysql_type_timestamp22 = C.MYSQL_TYPE_TIMESTAMP
|
||||
const mysql_type_json = C.MYSQL_TYPE_JSON
|
||||
const mysql_type_newdecimal = C.MYSQL_TYPE_NEWDECIMAL
|
||||
const mysql_type_enum = C.MYSQL_TYPE_ENUM
|
||||
const mysql_type_set = C.MYSQL_TYPE_SET
|
||||
const mysql_type_tiny_blob = C.MYSQL_TYPE_TINY_BLOB
|
||||
const mysql_type_medium_blob = C.MYSQL_TYPE_MEDIUM_BLOB
|
||||
const mysql_type_long_blob = C.MYSQL_TYPE_LONG_BLOB
|
||||
const mysql_type_blob = C.MYSQL_TYPE_BLOB
|
||||
const mysql_type_var_string = C.MYSQL_TYPE_VAR_STRING
|
||||
const mysql_type_string = C.MYSQL_TYPE_STRING
|
||||
const mysql_type_geometry = C.MYSQL_TYPE_GEOMETRY
|
||||
const mysql_no_data = C.MYSQL_NO_DATA
|
||||
|
||||
fn C.mysql_stmt_init(&C.MYSQL) &C.MYSQL_STMT
|
||||
fn C.mysql_stmt_prepare(&C.MYSQL_STMT, &char, u32) int
|
||||
|
|
|
@ -15,28 +15,26 @@ $if windows {
|
|||
#include "sqlite3.h"
|
||||
|
||||
// https://www.sqlite.org/rescode.html
|
||||
pub const (
|
||||
sqlite_ok = 0
|
||||
sqlite_error = 1
|
||||
sqlite_row = 100
|
||||
sqlite_done = 101
|
||||
sqlite_cantopen = 14
|
||||
sqlite_ioerr_read = 266
|
||||
sqlite_ioerr_short_read = 522
|
||||
sqlite_ioerr_write = 778
|
||||
sqlite_ioerr_fsync = 1034
|
||||
sqlite_ioerr_fstat = 1802
|
||||
sqlite_ioerr_delete = 2570
|
||||
pub const sqlite_ok = 0
|
||||
pub const sqlite_error = 1
|
||||
pub const sqlite_row = 100
|
||||
pub const sqlite_done = 101
|
||||
pub const sqlite_cantopen = 14
|
||||
pub const sqlite_ioerr_read = 266
|
||||
pub const sqlite_ioerr_short_read = 522
|
||||
pub const sqlite_ioerr_write = 778
|
||||
pub const sqlite_ioerr_fsync = 1034
|
||||
pub const sqlite_ioerr_fstat = 1802
|
||||
pub const sqlite_ioerr_delete = 2570
|
||||
|
||||
sqlite_open_main_db = 0x00000100
|
||||
sqlite_open_temp_db = 0x00000200
|
||||
sqlite_open_transient_db = 0x00000400
|
||||
sqlite_open_main_journal = 0x00000800
|
||||
sqlite_open_temp_journal = 0x00001000
|
||||
sqlite_open_subjournal = 0x00002000
|
||||
sqlite_open_super_journal = 0x00004000
|
||||
sqlite_open_wal = 0x00080000
|
||||
)
|
||||
pub const sqlite_open_main_db = 0x00000100
|
||||
pub const sqlite_open_temp_db = 0x00000200
|
||||
pub const sqlite_open_transient_db = 0x00000400
|
||||
pub const sqlite_open_main_journal = 0x00000800
|
||||
pub const sqlite_open_temp_journal = 0x00001000
|
||||
pub const sqlite_open_subjournal = 0x00002000
|
||||
pub const sqlite_open_super_journal = 0x00004000
|
||||
pub const sqlite_open_wal = 0x00080000
|
||||
|
||||
pub enum SyncMode {
|
||||
off
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue