package main import ( //"github.com/joaojeronimo/go-crc16" //"fmt" //"strconv" "git.wecise.com/wecise/mring" . "git.wecise.com/wecise/odbserver/odb" "git.wecise.com/wecise/odbserver/odb/test" "gitee.com/wecisecode/util/logger" ) // CGO_ENABLED=1 go run --ldflags '-linkmode external -extldflags "-static"' testcql.go // #cgo LDFLAGS: -L/opt/odbserver/sqlite -lsqlite -ldl // #include "/opt/odbserver/sqlite/sqlite.h" // #include // #include // extern int64_t uhaha_seed; // extern int64_t uhaha_ts; // void uhaha_begin_reader(); // void uhaha_end_reader(); func Init() { ODB = NewOMDB() MRingHandle = mring.Default() } func main() { Init() logger.SetConsole(true) //option := &StoreOption{Cache:CacheAll} option := &Option{Cache: CacheAll, Keyspace: "oootest", DisableInitialHostLookup: true, DisableTask: true, DisableNotify: true} g, err := test.NewG(option) if err != nil { logger.Errorf(err.Error()) } else { defer g.Close() } if err := g.GetSession().Exec(`CREATE TABLE IF NOT EXISTS counter( id counter, domain text, PRIMARY KEY (domain) )WITH caching = {'keys':'NONE', 'rows_per_partition':'ALL' }; CREATE TABLE IF NOT EXISTS colbulk ( domain varchar, cap map, collucene map, colstamp map, PRIMARY KEY (domain) )WITH caching = {'keys':'NONE', 'rows_per_partition':'ALL' };`); err != nil { logger.Errorf("adjust class error: %v", err.Error()) } }