wecisecode 1 месяц назад
Родитель
Сommit
1e24a9cf3f

+ 30 - 0
odbctest/mql/0/cassdborderby/1class.mql

@@ -0,0 +1,30 @@
+
+
+
+create class if not exists /oktest() with namespace="oktest"
+;
+
+delete from /oktest/bbb with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+drop class if exists /oktest/bbb
+;
+
+create class /oktest/bbb (
+    v_varchar		varchar,
+    v_text			text,
+    v_int			int,
+    v_bigint		bigint,
+    v_double		double,
+    v_float			float,
+    v_bool			bool,
+    v_date          date,
+    v_time_start    timestamp,
+    v_time_end      timestamp,
+    
+    indexes(v_varchar, v_text, v_int, v_bigint, v_double, v_float, v_bool, v_date, v_time_start, v_time_end),
+    keys(v_varchar, v_date, v_time_start, v_time_end)
+) with core=cassandraonly;

+ 20 - 0
odbctest/mql/0/cassdborderby/2.data.mql

@@ -0,0 +1,20 @@
+
+insert into /oktest/bbb (v_varchar, v_date, v_time_start, v_time_end, v_text, v_int, v_bigint, v_double, v_float, v_bool)
+ values ('abc', '2010-10-20', '2010-10-20 12:34:56.789', '2010-10-21 23:45:57.891', '1234567890123456789', 123, 1234567890123, 1.1234567890123456, 1.123456, true)
+;
+
+insert into /oktest/bbb (v_varchar, v_date, v_time_start, v_time_end, v_text, v_int, v_bigint, v_double, v_float, v_bool)
+ values ('abc', '2010-10-21', '2010-10-21 12:34:56.789', '2010-10-22 23:45:57.891', '1234567890123456789', 123, 1234567890123, 1.1234567890123456, 1.123456, true)
+;
+
+insert into /oktest/bbb (v_varchar, v_date, v_time_start, v_time_end, v_text, v_int, v_bigint, v_double, v_float, v_bool)
+ values ('abc', '2010-10-22', '2010-10-22 12:34:56.789', '2010-10-23 23:45:57.891', '1234567890123456789', 123, 1234567890123, 1.1234567890123456, 1.123456, true)
+;
+
+insert into /oktest/bbb (v_varchar, v_date, v_time_start, v_time_end, v_text, v_int, v_bigint, v_double, v_float, v_bool)
+ values ('abc', '2010-10-23', '2010-10-23 12:34:56.789', '2010-10-24 23:45:57.891', '1234567890123456789', 123, 1234567890123, 1.1234567890123456, 1.123456, true)
+;
+
+insert into /oktest/bbb (v_varchar, v_date, v_time_start, v_time_end, v_text, v_int, v_bigint, v_double, v_float, v_bool)
+ values ('abc', '2010-10-24', '2010-10-24 12:34:56.789', '2010-10-25 23:45:57.891', '1234567890123456789', 123, 1234567890123, 1.1234567890123456, 1.123456, true)
+;

+ 8 - 0
odbctest/mql/0/cassdborderby/3.check.mql

@@ -0,0 +1,8 @@
+
+
+select v_varchar, v_date, v_time_start as "o_time_start", v_time_end as "o_time_end", dateformat(v_time_start,'yyyy-MM-dd HH:mm:ss') as "v_time_start", dateformat(v_time_end,'yyyy-MM-dd HH:mm:ss') as "v_time_end" from /oktest/bbb
+order by v_time_end desc
+/**
+output()
+**/
+;

+ 22 - 0
odbctest/mql/0/keysid/1.class.mql

@@ -0,0 +1,22 @@
+
+
+create class if not exists /oktest() with namespace="oktest"
+;
+
+
+create class /oktest/aaa (
+    v_varchar		varchar,
+    v_text			text,
+    v_int			int,
+    v_bigint		bigint,
+    v_double		double,
+    v_float			float,
+    v_bool			bool,
+    v_blob			blob,
+    v_date          date,
+    v_timestamp     timestamp,
+    
+    indexes(v_varchar, v_text, v_int, v_bigint, v_double, v_float, v_bool, v_date, v_timestamp),
+    keys(v_varchar, v_date, v_timestamp)
+) with core=cassandraonly;
+

+ 4 - 0
odbctest/mql/0/keysid/2.data.mql

@@ -0,0 +1,4 @@
+
+insert into /oktest/aaa (v_varchar, v_date, v_timestamp, v_text, v_int, v_bigint, v_double, v_float, v_bool, v_blob)
+ values ('abc', '2010-10-20', '2010-10-20 12:34:56.789', '1234567890123456789', 123, 1234567890123, 1.1234567890123456, 1.123456, true, {"x":1})
+;

+ 30 - 0
odbctest/mql/0/memdborderby/1class.mql

@@ -0,0 +1,30 @@
+
+
+
+create class if not exists /oktest() with namespace="oktest"
+;
+
+delete from /oktest/ccc with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+drop class if exists /oktest/ccc
+;
+
+create class /oktest/ccc (
+    v_varchar		varchar,
+    v_text			text,
+    v_int			int,
+    v_bigint		bigint,
+    v_double		double,
+    v_float			float,
+    v_bool			bool,
+    v_date          date,
+    v_time_start    timestamp,
+    v_time_end      timestamp,
+    
+    indexes(v_varchar, v_text, v_int, v_bigint, v_double, v_float, v_bool, v_date, v_time_start, v_time_end),
+    keys(v_varchar, v_date, v_time_start, v_time_end)
+) with core=memoryonly;

+ 20 - 0
odbctest/mql/0/memdborderby/2.data.mql

@@ -0,0 +1,20 @@
+
+insert into /oktest/ccc (v_varchar, v_date, v_time_start, v_time_end, v_text, v_int, v_bigint, v_double, v_float, v_bool)
+ values ('abc', '2010-10-20', '2010-10-20 12:34:56.789', '2010-10-21 23:45:57.891', '1234567890123456789', 123, 1234567890123, 1.1234567890123456, 1.123456, true)
+;
+
+insert into /oktest/ccc (v_varchar, v_date, v_time_start, v_time_end, v_text, v_int, v_bigint, v_double, v_float, v_bool)
+ values ('abc', '2010-10-21', '2010-10-21 12:34:56.789', '2010-10-22 23:45:57.891', '1234567890123456789', 123, 1234567890123, 1.1234567890123456, 1.123456, true)
+;
+
+insert into /oktest/ccc (v_varchar, v_date, v_time_start, v_time_end, v_text, v_int, v_bigint, v_double, v_float, v_bool)
+ values ('abc', '2010-10-22', '2010-10-22 12:34:56.789', '2010-10-23 23:45:57.891', '1234567890123456789', 123, 1234567890123, 1.1234567890123456, 1.123456, true)
+;
+
+insert into /oktest/ccc (v_varchar, v_date, v_time_start, v_time_end, v_text, v_int, v_bigint, v_double, v_float, v_bool)
+ values ('abc', '2010-10-23', '2010-10-23 12:34:56.789', '2010-10-24 23:45:57.891', '1234567890123456789', 123, 1234567890123, 1.1234567890123456, 1.123456, true)
+;
+
+insert into /oktest/ccc (v_varchar, v_date, v_time_start, v_time_end, v_text, v_int, v_bigint, v_double, v_float, v_bool)
+ values ('abc', '2010-10-24', '2010-10-24 12:34:56.789', '2010-10-25 23:45:57.891', '1234567890123456789', 123, 1234567890123, 1.1234567890123456, 1.123456, true)
+;

+ 16 - 0
odbctest/mql/0/memdborderby/3.check.mql

@@ -0,0 +1,16 @@
+
+
+select v_varchar, v_date, v_time_start as "o_time_start", v_time_end as "o_time_end", dateformat(v_time_start,'yyyy-MM-dd HH:mm:ss') as "v_time_start", dateformat(v_time_end,'yyyy-MM-dd HH:mm:ss') as "v_time_end" from /oktest/ccc
+order by v_time_end desc
+/**
+output()
+**/
+;
+
+{
+    "sql": "select v_varchar, v_date as s_date, cast(v_date as int), v_time_start, v_time_end from /oktest/ccc order by v_time_end desc"
+}
+/**
+output()
+**/
+;

+ 8 - 0
odbctest/mql/basic/10memdb/30.fullsearch2.mql

@@ -1,4 +1,12 @@
 
+select * from /test/basic2 where v_text like ?
+/**
+params("%2003%")
+output()
+count(1)
+**/
+;
+
 select * from /test/basic2 where v_text='hello'
 /**
 count(1)