Verified Commit 78c6228b authored by Camil Staps's avatar Camil Staps 🙂

Move Database.SQL._MySQL from OS-Mac and OS-Linux-64 to OS-Posix (they are the...

Move Database.SQL._MySQL from OS-Mac and OS-Linux-64 to OS-Posix (they are the same, and it works on x86 as well)
parent ed2960d7
Pipeline #42030 passed with stage
in 2 minutes and 8 seconds
definition module Database.SQL._MySQL
import System._Pointer
//MySQL C-API Constants and Offsets
ENUM_FLAG :== 256
CLIENT_FOUND_ROWS :== 2
MYSQL_TYPE_TINY :== 1
MYSQL_TYPE_SHORT :== 2
MYSQL_TYPE_LONG :== 3
MYSQL_TYPE_INT24 :== 9
MYSQL_TYPE_LONGLONG :== 8
MYSQL_TYPE_DECIMAL :== 0
MYSQL_TYPE_NEWDECIMAL :== 246
MYSQL_TYPE_FLOAT :== 4
MYSQL_TYPE_DOUBLE :== 5
MYSQL_TYPE_TIMESTAMP :== 7
MYSQL_TYPE_DATE :== 10
MYSQL_TYPE_TIME :== 11
MYSQL_TYPE_DATETIME :== 12
MYSQL_TYPE_STRING :== 254
MYSQL_TYPE_VAR_STRING :== 253
MYSQL_TYPE_BLOB :== 252
MYSQL_TYPE_ENUM :== 247
SIZEOF_MYSQL_FIELD :== 128
MYSQL_FIELD_TYPE_OFFSET :== 112
MYSQL_FIELD_FLAGS_OFFSET :== 100
//MySQL C-API foreign functions
// libmysqlclient access
mysql_affected_rows :: !Pointer -> Int
mysql_close :: !Pointer -> Int
mysql_errno :: !Pointer -> Int
mysql_error :: !Pointer -> Pointer
mysql_fetch_fields :: !Pointer -> Pointer
mysql_fetch_lengths :: !Pointer -> Pointer
mysql_fetch_row :: !Pointer -> Pointer
mysql_free_result :: !Pointer -> Int
mysql_init :: !Int -> Pointer
mysql_insert_id :: !Pointer -> Int
mysql_num_fields :: !Pointer -> Int
mysql_num_rows :: !Pointer -> Int
mysql_real_connect :: !Pointer !{#Char} !{#Char} !{#Char} !{#Char} !Int !Int !Int -> Pointer
mysql_real_escape_string :: !Pointer !{#Char} !{#Char} !Int -> Int
mysql_real_query :: !Pointer !{#Char} !Int -> Int
mysql_store_result :: !Pointer -> Pointer
implementation module Database.SQL._MySQL
import System._Pointer
mysql_affected_rows :: !Pointer -> Int
mysql_affected_rows a0 = code {
ccall mysql_affected_rows "p:I"
}
mysql_close :: !Pointer -> Int
mysql_close a0 = code {
ccall mysql_close "p:I"
}
mysql_errno :: !Pointer -> Int
mysql_errno a0 = code {
ccall mysql_errno "p:I"
}
mysql_error :: !Pointer -> Pointer
mysql_error a0 = code {
ccall mysql_error "p:p"
}
mysql_fetch_fields :: !Pointer -> Pointer
mysql_fetch_fields a0 = code {
ccall mysql_fetch_fields "p:p"
}
mysql_fetch_lengths :: !Pointer -> Pointer
mysql_fetch_lengths a0 = code {
ccall mysql_fetch_lengths "p:p"
}
mysql_fetch_row :: !Pointer -> Pointer
mysql_fetch_row a0 = code {
ccall mysql_fetch_row "p:p"
}
mysql_free_result :: !Pointer -> Int
mysql_free_result a0 = code {
ccall mysql_free_result "p:I"
}
mysql_init :: !Int -> Pointer
mysql_init a0 = code {
ccall mysql_init "p:p"
}
mysql_insert_id :: !Pointer -> Int
mysql_insert_id a0 = code {
ccall mysql_insert_id "p:I"
}
mysql_num_fields :: !Pointer -> Int
mysql_num_fields a0 = code {
ccall mysql_num_fields "p:I"
}
mysql_num_rows :: !Pointer -> Int
mysql_num_rows a0 = code {
ccall mysql_num_rows "p:I"
}
mysql_real_connect :: !Pointer !{#Char} !{#Char} !{#Char} !{#Char} !Int !Int !Int -> Pointer
mysql_real_connect a0 a1 a2 a3 a4 a5 a6 a7 = code {
ccall mysql_real_connect "pssssIII:p"
}
mysql_real_escape_string :: !Pointer !{#Char} !{#Char} !Int -> Int
mysql_real_escape_string a0 a1 a2 a3 = code {
ccall mysql_real_escape_string "pssI:I"
}
mysql_real_query :: !Pointer !{#Char} !Int -> Int
mysql_real_query a0 a1 a2 = code {
ccall mysql_real_query "psI:I"
}
mysql_store_result :: !Pointer -> Pointer
mysql_store_result a0 = code {
ccall mysql_store_result "p:p"
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment