Verified Commit af367470 authored by Camil Staps's avatar Camil Staps 🚀

Move Database.SQL._SQLite to OS-Independent

parent 96bc3947
Pipeline #34184 failed with stage
in 1 minute and 8 seconds
Clean System Files
_Tests
_Tests.*
*.abc
*.bc
*.o
*-sapl
*-www
*-data
*.tcl
*.prj
*.prp
* Time Profile.pcl
*.exe
a.out
* Time Profile.pcl
_Tests
_Tests.*
implementation module Database.SQL._SQLite
import System._Pointer
import code from library "-lsqlite3"
import code from library "sqlite3_library"
sqlite3_open :: !{#Char} -> (!Int,!Pointer)
sqlite3_open a0 = code {
ccall sqlite3_open "s:Ip"
......
definition module Database.SQL._SQLite
import System._Pointer
//SQLite C-API Constants and Offsets
SQLITE_OK :== 0
SQLITE_ERROR :== 1
SQLITE_ROW :== 100
SQLITE_DONE :== 101
SQLITE_INTEGER :== 1
SQLITE_FLOAT :== 2
SQLITE_TEXT :== 3
SQLITE_BLOB :== 4
SQLITE_NULL :== 5
SQLITE_STATIC :== 0
SQLITE_TRANSIENT :== -1
//SQLite C-API foreign functions
sqlite3_open :: !{#Char} -> (!Int,!Pointer)
sqlite3_close :: !Pointer -> Int
sqlite3_errcode :: !Pointer -> Int
sqlite3_errmsg :: !Pointer -> Pointer
sqlite3_prepare :: !Pointer !{#Char} !Int -> (!Int,!Pointer,!Pointer)
sqlite3_bind_null :: !Pointer !Int -> Int
sqlite3_bind_text :: !Pointer !Int !{#Char} !Int !Pointer -> Int
sqlite3_bind_blob :: !Pointer !Int !{#Char} !Int !Pointer -> Int
sqlite3_bind_int64 :: !Pointer !Int !Int -> Int
sqlite3_bind_double :: !Pointer !Int !Real -> Int
sqlite3_step :: !Pointer -> Int
sqlite3_finalize :: !Pointer -> Int
sqlite3_column_count :: !Pointer -> Int
sqlite3_column_type :: !Pointer !Int -> Int
sqlite3_column_int :: !Pointer !Int -> Int
sqlite3_column_text :: !Pointer !Int -> Pointer
sqlite3_last_insert_rowid :: !Pointer -> Int
sqlite3_changes :: !Pointer -> Int
implementation module Database.SQL._SQLite
import System._Pointer
sqlite3_open :: !{#Char} -> (!Int,!Pointer)
sqlite3_open a0 = code {
ccall sqlite3_open "s:Ip"
}
sqlite3_close :: !Pointer -> Int
sqlite3_close a0 = code {
ccall sqlite3_close "p:I"
}
sqlite3_errcode :: !Pointer -> Int
sqlite3_errcode a0 = code {
ccall sqlite3_errcode "p:I"
}
sqlite3_errmsg :: !Pointer -> Pointer
sqlite3_errmsg a0 = code {
ccall sqlite3_errmsg "p:p"
}
sqlite3_prepare :: !Pointer !{#Char} !Int -> (!Int,!Pointer,!Pointer)
sqlite3_prepare a0 a1 a2 = code {
ccall sqlite3_prepare "psI:Ipp"
}
sqlite3_bind_null :: !Pointer !Int -> Int
sqlite3_bind_null a0 a1 = code {
ccall sqlite3_bind_null "pI:I"
}
sqlite3_bind_text :: !Pointer !Int !{#Char} !Int !Pointer -> Int
sqlite3_bind_text a0 a1 a2 a3 a4 = code {
ccall sqlite3_bind_text "pIsIp:I"
}
sqlite3_bind_blob :: !Pointer !Int !{#Char} !Int !Pointer -> Int
sqlite3_bind_blob a0 a1 a2 a3 a4 = code {
ccall sqlite3_bind_blob "pIsIp:I"
}
sqlite3_bind_int64 :: !Pointer !Int !Int -> Int
sqlite3_bind_int64 a0 a1 a2 = code {
ccall sqlite3_bind_int64 "pII:I"
}
sqlite3_bind_double :: !Pointer !Int !Real -> Int
sqlite3_bind_double a0 a1 a2 = code {
ccall sqlite3_bind_double "pIr:I"
}
sqlite3_step :: !Pointer -> Int
sqlite3_step a0 = code {
ccall sqlite3_step "p:I"
}
sqlite3_finalize :: !Pointer -> Int
sqlite3_finalize a0 = code {
ccall sqlite3_finalize "p:I"
}
sqlite3_column_count :: !Pointer -> Int
sqlite3_column_count a0 = code {
ccall sqlite3_column_count "p:I"
}
sqlite3_column_type :: !Pointer !Int -> Int
sqlite3_column_type a0 a1 = code {
ccall sqlite3_column_type "pI:I"
}
sqlite3_column_int :: !Pointer !Int -> Int
sqlite3_column_int a0 a1 = code {
ccall sqlite3_column_int "pI:I"
}
sqlite3_column_text :: !Pointer !Int -> Pointer
sqlite3_column_text a0 a1 = code {
ccall sqlite3_column_text "pI:p"
}
sqlite3_last_insert_rowid :: !Pointer -> Int
sqlite3_last_insert_rowid a0 = code {
ccall sqlite3_last_insert_rowid "p:I"
}
sqlite3_changes :: !Pointer -> Int
sqlite3_changes a0 = code {
ccall sqlite3_changes "p:I"
}
sqlite3.dll
sqlite3_open
sqlite3_close
sqlite3_errcode
sqlite3_errmsg
sqlite3_prepare
sqlite3_bind_null
sqlite3_bind_text
sqlite3_bind_blob
sqlite3_bind_int64
sqlite3_bind_double
sqlite3_step
sqlite3_finalize
sqlite3_column_count
sqlite3_column_type
sqlite3_column_int
sqlite3_column_text
sqlite3_last_insert_rowid
sqlite3_changes
definition module Database.SQL._SQLite
import System._Pointer
//SQLite C-API Constants and Offsets
SQLITE_OK :== 0
SQLITE_ERROR :== 1
SQLITE_ROW :== 100
SQLITE_DONE :== 101
SQLITE_INTEGER :== 1
SQLITE_FLOAT :== 2
SQLITE_TEXT :== 3
SQLITE_BLOB :== 4
SQLITE_NULL :== 5
SQLITE_STATIC :== 0
SQLITE_TRANSIENT :== -1
//SQLite C-API foreign functions
sqlite3_open :: !{#Char} -> (!Int,!Pointer)
sqlite3_close :: !Pointer -> Int
sqlite3_errcode :: !Pointer -> Int
sqlite3_errmsg :: !Pointer -> Pointer
sqlite3_prepare :: !Pointer !{#Char} !Int -> (!Int,!Pointer,!Pointer)
sqlite3_bind_null :: !Pointer !Int -> Int
sqlite3_bind_text :: !Pointer !Int !{#Char} !Int !Pointer -> Int
sqlite3_bind_blob :: !Pointer !Int !{#Char} !Int !Pointer -> Int
sqlite3_bind_int64 :: !Pointer !Int !Int -> Int
sqlite3_bind_double :: !Pointer !Int !Real -> Int
sqlite3_step :: !Pointer -> Int
sqlite3_finalize :: !Pointer -> Int
sqlite3_column_count :: !Pointer -> Int
sqlite3_column_type :: !Pointer !Int -> Int
sqlite3_column_int :: !Pointer !Int -> Int
sqlite3_column_text :: !Pointer !Int -> Pointer
sqlite3_last_insert_rowid :: !Pointer -> Int
sqlite3_changes :: !Pointer -> Int
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