started work datasources admin

This commit is contained in:
Torkel Ödegaard
2014-12-16 12:04:08 +01:00
parent f665a30d28
commit b70a3f0958
14 changed files with 104 additions and 21 deletions
+1
View File
@@ -151,6 +151,7 @@ func (mapper SnakeMapper) Table2Obj(name string) string {
func (mapper SnakeMapper) TableName(t string) string {
return t
}
// provide prefix table name support
type PrefixMapper struct {
Mapper IMapper
+3 -3
View File
@@ -33,7 +33,7 @@ extension for Regexp matcher operation.
#include <string.h>
#include <stdio.h>
#include <sqlite3ext.h>
SQLITE_EXTENSION_INIT1
static void regexp_func(sqlite3_context *context, int argc, sqlite3_value **argv) {
if (argc >= 2) {
@@ -44,7 +44,7 @@ extension for Regexp matcher operation.
int vec[500];
int n, rc;
pcre* re = pcre_compile(pattern, 0, &errstr, &erroff, NULL);
rc = pcre_exec(re, NULL, target, strlen(target), 0, 0, vec, 500);
rc = pcre_exec(re, NULL, target, strlen(target), 0, 0, vec, 500);
if (rc <= 0) {
sqlite3_result_error(context, errstr, 0);
return;
@@ -52,7 +52,7 @@ extension for Regexp matcher operation.
sqlite3_result_int(context, 1);
}
}
#ifdef _WIN32
__declspec(dllexport)
#endif
+3 -3
View File
@@ -318,7 +318,7 @@ func BenchmarkQuery(b *testing.B) {
var i int
var f float64
var s string
// var t time.Time
// var t time.Time
if err := db.QueryRow("select null, 1, 1.1, 'foo'").Scan(&n, &i, &f, &s); err != nil {
panic(err)
}
@@ -331,7 +331,7 @@ func BenchmarkParams(b *testing.B) {
var i int
var f float64
var s string
// var t time.Time
// var t time.Time
if err := db.QueryRow("select ?, ?, ?, ?", nil, 1, 1.1, "foo").Scan(&n, &i, &f, &s); err != nil {
panic(err)
}
@@ -350,7 +350,7 @@ func BenchmarkStmt(b *testing.B) {
var i int
var f float64
var s string
// var t time.Time
// var t time.Time
if err := st.QueryRow(nil, 1, 1.1, "foo").Scan(&n, &i, &f, &s); err != nil {
panic(err)
}