2024-08-20 11:09:35 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import "C"
|
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
|
2024-08-20 19:10:21 +00:00
|
|
|
"github.com/nesterow/dal/pkg/facade"
|
2024-08-20 17:34:01 +00:00
|
|
|
|
2024-08-20 11:09:35 +00:00
|
|
|
_ "github.com/mattn/go-sqlite3"
|
|
|
|
)
|
|
|
|
|
|
|
|
//export InitSQLite
|
|
|
|
func InitSQLite(pragmas string) {
|
|
|
|
pragmasArray := strings.Split(pragmas, ";")
|
|
|
|
facade.InitSQLite(pragmasArray)
|
|
|
|
}
|
|
|
|
|
|
|
|
//export HandleQuery
|
|
|
|
func HandleQuery(input []byte) []byte {
|
|
|
|
var out []byte
|
|
|
|
facade.HandleQuery(&input, &out)
|
|
|
|
return out
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {}
|