• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

group of test apps


Commit MetaInfo

Revisãodb1276cf3eade32aebf28aa43ba7b4aeba7d0008 (tree)
Hora2014-01-29 12:43:14
Autorastoria-d <astoria-d@mail...>
Commiterastoria-d

Mensagem de Log

sqlite-test added

Mudança Sumário

Diff

--- /dev/null
+++ b/sqlite-test/.gitignore
@@ -0,0 +1 @@
1+moto-linux/*
--- /dev/null
+++ b/sqlite-test/db-create.txt
@@ -0,0 +1,253 @@
1+create table _SYS_APP_FIELDS (
2+_rowid longlong NOT NULL UNIQUE ,
3+_timestamp datetime ,
4+_version long ,
5+indexType int ,
6+name varchar ,
7+type varchar ,
8+primaryKey int ,
9+length int ,
10+table_id longlong ,
11+notNull int ,
12+defaultValue varchar )
13+go
14+create table _SYS_APP_PREFERENCES (
15+_rowid longlong NOT NULL UNIQUE ,
16+_timestamp datetime ,
17+_version long ,
18+key varchar INDEX ,
19+value varchar ,
20+order long INDEX )
21+go
22+create table _SYS_APP_TABLES (
23+_rowid longlong NOT NULL UNIQUE ,
24+_timestamp datetime ,
25+_version long ,
26+name varchar ,
27+x float ,
28+y float ,
29+height float ,
30+width float ,
31+primaryKeyFieldID longlong ,
32+clusteredFieldID longlong )
33+go
34+delete from _SYS_APPS
35+go
36+delete from _SYS_GROUPS
37+go
38+create table _SYS_JDBC2v1 (
39+_rowid longlong NOT NULL UNIQUE ,
40+_timestamp datetime ,
41+_version long ,
42+typename char(50) ,
43+type int ,
44+searchable int ,
45+precision int ,
46+max_scale int ,
47+order int )
48+go
49+create table _SYS_JDBC4 (
50+_rowid longlong NOT NULL UNIQUE ,
51+_timestamp datetime ,
52+_version long ,
53+typename char(50) ,
54+type int ,
55+searchable int ,
56+precision int ,
57+max_scale int ,
58+order int )
59+go
60+delete from _SYS_PERM
61+go
62+create table _SYS_QUERY (
63+_rowid longlong NOT NULL UNIQUE ,
64+_timestamp datetime ,
65+_version long ,
66+title char(200) INDEX ,
67+sql object )
68+go
69+delete from _SYS_RELATIONSHIP
70+go
71+delete from _SYS_REPLICATION
72+go
73+delete from _SYS_USERS
74+go
75+create table CITY (
76+_rowid longlong NOT NULL UNIQUE ,
77+_timestamp datetime ,
78+_version long ,
79+CITY_ID int UNIQUE ,
80+NAME varchar )
81+go
82+CREATE PRIMARY KEY CITY (CITY_ID)
83+go
84+create table DEPARTMENT (
85+_rowid longlong NOT NULL UNIQUE ,
86+_timestamp datetime ,
87+_version long ,
88+PHONE varchar ,
89+NAME varchar ,
90+SECRETARY_ID int ,
91+DEPARTMENT_ID int UNIQUE )
92+go
93+CREATE PRIMARY KEY DEPARTMENT (DEPARTMENT_ID)
94+go
95+create table EMPLOYEE (
96+_rowid longlong NOT NULL UNIQUE ,
97+_timestamp datetime ,
98+_version long ,
99+CITY_ID int ,
100+DEPARTMENT_ID int ,
101+EMPLOYEE_ID int NOT NULL UNIQUE ,
102+LASTNAME varchar ,
103+FIRSTNAME varchar ,
104+EXTENSION varchar )
105+go
106+CREATE PRIMARY KEY EMPLOYEE (EMPLOYEE_ID)
107+go
108+create table EO_PK_TABLE (
109+_rowid longlong NOT NULL UNIQUE ,
110+_timestamp datetime ,
111+_version long ,
112+NAME char(40) ,
113+PK int )
114+go
115+TABLE _SYS_APP_FIELDS
116+_rowid, _timestamp, _version, defaultValue, indexType, length, name, notNull, primaryKey, table_id, type
117+'1' , '11207787.889387995004' , '5' , '' , '2' , '4' , 'CITY_ID' , '0' , '1' , '1' , 'integer'
118+'2' , '11207787.873592067510' , '5' , '' , '2' , '8' , '_rowid' , '1' , '0' , '1' , 'longlong'
119+'3' , '11207787.881354546174' , '5' , '' , '0' , '8' , '_timestamp' , '0' , '0' , '1' , 'datetime'
120+'4' , '11207787.885409614071' , '5' , '' , '0' , '4' , '_version' , '0' , '0' , '1' , 'long'
121+'5' , '11207787.894005864858' , '5' , '' , '0' , '4096' , 'NAME' , '0' , '0' , '1' , 'char'
122+'6' , '11207787.995252961292' , '6' , '' , '0' , '4096' , 'LASTNAME' , '0' , '0' , '2' , 'char'
123+'7' , '11207787.975824093446' , '5' , '' , '0' , '4' , '_version' , '0' , '0' , '2' , 'long'
124+'8' , '11207787.979770679026' , '5' , '' , '0' , '4' , 'CITY_ID' , '0' , '0' , '2' , 'integer'
125+'9' , '11207787.962303306907' , '5' , '' , '2' , '8' , '_rowid' , '1' , '0' , '2' , 'longlong'
126+'10' , '11207787.970909984782' , '5' , '' , '0' , '8' , '_timestamp' , '0' , '0' , '2' , 'datetime'
127+'11' , '11207936.149342946708' , '7' , '' , '0' , '4096' , 'EXTENSION' , '0' , '0' , '2' , 'char'
128+'12' , '11207787.991427551954' , '7' , '' , '2' , '4' , 'EMPLOYEE_ID' , '1' , '1' , '2' , 'integer'
129+'13' , '11207788.003969855606' , '6' , '' , '0' , '4096' , 'FIRSTNAME' , '0' , '0' , '2' , 'char'
130+'14' , '11207787.987668121233' , '5' , '' , '0' , '4' , 'DEPARTMENT_ID' , '0' , '0' , '2' , 'integer'
131+'15' , '11207788.081188667565' , '5' , '' , '0' , '4096' , 'PHONE' , '0' , '0' , '3' , 'char'
132+'16' , '11207788.073375049978' , '5' , '' , '0' , '8' , '_timestamp' , '0' , '0' , '3' , 'datetime'
133+'17' , '11207788.064866315573' , '5' , '' , '2' , '8' , '_rowid' , '1' , '0' , '3' , 'longlong'
134+'18' , '11207788.084977816790' , '5' , '' , '0' , '4096' , 'NAME' , '0' , '0' , '3' , 'char'
135+'19' , '11207788.088803105056' , '5' , '' , '0' , '4' , 'SECRETARY_ID' , '0' , '0' , '3' , 'integer'
136+'20' , '11207788.077288936823' , '5' , '' , '0' , '4' , '_version' , '0' , '0' , '3' , 'long'
137+'21' , '11207788.092554474250' , '5' , '' , '2' , '4' , 'DEPARTMENT_ID' , '0' , '1' , '3' , 'integer'
138+TABLE _SYS_APP_PREFERENCES
139+_rowid, _timestamp, _version, key, order, value
140+'1' , '11725615.682600136846' , '9' , 'SchemaDatabaseVersion' , '0' , '1'
141+'2' , '9475504.511265635490' , '1' , 'SchemaVersion' , '0' , ''
142+'3' , '11207936.239944290370' , '12' , 'SchemaTimeStamp' , '0' , '182;2001-05-10 13:18:56 -0400;3;2001-05-10 13:18:56 -0400;21;2001-05-10 13:18:56 -0400'
143+TABLE _SYS_APP_TABLES
144+_rowid, _timestamp, _version, clusteredFieldID, height, name, primaryKeyFieldID, width, x, y
145+'1' , '11207936.171712143346' , '11' , '405328' , '75.0000000000000' , 'CITY' , NULL, '150.0000000000000' , '204.0000000000000' , '153.0000000000000'
146+'2' , '11207936.153827134520' , '11' , '405328' , '75.0000000000000' , 'EMPLOYEE' , NULL, '150.0000000000000' , '204.0000000000000' , '153.0000000000000'
147+'3' , '11207936.188525659963' , '10' , '405328' , '75.0000000000000' , 'DEPARTMENT' , NULL, '150.0000000000000' , '204.0000000000000' , '153.0000000000000'
148+TABLE _SYS_APPS
149+_rowid, _timestamp, _version, appName
150+'2' , '9475502.458313584327' , '1' , 'OpenBaseManager'
151+'3' , '11125299.483367169275' , '1' , 'JDBC'
152+TABLE _SYS_GROUPS
153+_rowid, _timestamp, _version, appAuthorizationEnabled, authorizedApps, blockedRadApps, group
154+'1' , '15869401.859825039282' , '3' , '0' , '||' , '||' , 'admin'
155+TABLE _SYS_JDBC2v1
156+_rowid, _timestamp, _version, max_scale, order, precision, searchable, type, typename
157+'1' , '15869376.265289928764' , '1' , '0' , '0' , '0' , '3' , '1' , 'char'
158+'2' , '15869376.267148101702' , '1' , '0' , '0' , '10' , '2' , '4' , 'int'
159+'3' , '15869376.268743053078' , '1' , '0' , '0' , '0' , '1' , '-4' , 'object'
160+'4' , '15869376.276104232296' , '1' , '0' , '0' , '20' , '2' , '-5' , 'longlong'
161+'5' , '15869376.277965048328' , '1' , '0' , '1' , '20' , '2' , '8' , 'double'
162+'6' , '15869376.279329052194' , '1' , '6' , '0' , '20' , '2' , '93' , 'datetime'
163+'7' , '15869376.280617693440' , '1' , '2' , '0' , '20' , '2' , '3' , 'money'
164+'8' , '15869376.281898763030' , '1' , '15' , '0' , '20' , '2' , '8' , 'float'
165+'9' , '15869376.283183138817' , '1' , '0' , '1' , '10' , '2' , '4' , 'long'
166+'10' , '15869376.284771358594' , '1' , '0' , '0' , '0' , '2' , '91' , 'date'
167+'11' , '15869376.286046359688' , '1' , '0' , '0' , '0' , '2' , '92' , 'time'
168+TABLE _SYS_JDBC4
169+_rowid, _timestamp, _version, max_scale, order, precision, searchable, type, typename
170+'1' , '9475499.504065632820' , '1' , '0' , '0' , '0' , '3' , '1' , 'char'
171+'2' , '9475499.504065632820' , '1' , '0' , '0' , '10' , '2' , '4' , 'int'
172+'3' , '9475499.514080047607' , '1' , '0' , '0' , '0' , '1' , '-4' , 'object'
173+'4' , '9475499.514080047607' , '1' , '0' , '0' , '20' , '2' , '-5' , 'longlong'
174+'5' , '9475499.514080047607' , '1' , '0' , '1' , '20' , '2' , '8' , 'double'
175+'6' , '9475499.514080047607' , '1' , '6' , '0' , '20' , '2' , '93' , 'datetime'
176+'7' , '9475499.514080047607' , '1' , '2' , '0' , '20' , '2' , '3' , 'money'
177+'8' , '9475499.514080047607' , '1' , '15' , '0' , '20' , '2' , '8' , 'float'
178+'9' , '9475499.514080047607' , '1' , '0' , '1' , '10' , '2' , '4' , 'long'
179+'10' , '9475499.524094343185' , '1' , '0' , '0' , '0' , '2' , '91' , 'date'
180+'11' , '9475499.524094343185' , '1' , '0' , '0' , '0' , '2' , '92' , 'time'
181+TABLE _SYS_PERM
182+_rowid, _timestamp, _version, name, p_delete, p_insert, p_select, p_update, table
183+TABLE _SYS_QUERY
184+_rowid, _timestamp, _version, sql, title
185+OBJECT
186+'<<<<*1*>>>>'
187+object
188+78
189+53454C4543542074302E5F726F7769642C2074302E5F74696D657374616D702C2074302E5F7665727369
190+6F6E2C2074302E434954595F49442C2074302E4E414D452046524F4D2043495459207430
191+.end.
192+'1' , '10515524.025541719050' , '2' , '<<<<*1*>>>>' , 'CityQuery'
193+OBJECT
194+'<<<<*2*>>>>'
195+object
196+111
197+53454C4543542074302E5F726F7769642C2074302E5F74696D657374616D702C2074302E5F7665727369
198+6F6E2C2074302E444550545F49442C2074302E4E414D452C2074302E50484F4E452C2074302E53454352
199+45544152595F49442046524F4D204445504152544D454E54207430
200+.end.
201+'2' , '10515536.128062479197' , '1' , '<<<<*2*>>>>' , 'DepartmentQuery'
202+OBJECT
203+'<<<<*3*>>>>'
204+object
205+137
206+53454C4543542074302E5F726F7769642C2074302E5F74696D657374616D702C2074302E5F7665727369
207+6F6E2C2074302E434954595F49442C2074302E444550545F49442C2074302E454D505F49442C2074302E
208+455854454E53494F4E2C2074302E46495253544E414D452C2074302E4C4153544E414D452046524F4D20
209+454D504C4F594545207430
210+.end.
211+'3' , '10515545.771298721432' , '1' , '<<<<*3*>>>>' , 'EmployeeQuery'
212+TABLE _SYS_REPLICATION
213+_rowid, _timestamp, _version, conflict_code, local_date, remote_date, tablename, target_database, target_host, target_password
214+TABLE _SYS_USERS
215+_rowid, _timestamp, _version, appSecurity, authorizedApps, email, fullname, login, password, popLogin, popPassword, popServer, smtpServer, usergroup
216+'1' , '15869401.867665303871' , '3' , '0' , NULL, '' , 'Administrator' , 'admin' , 'DIAJDIGDHDBCJDCI' , '' , '' , '' , '' , 'admin'
217+TABLE CITY
218+_rowid, _timestamp, _version, CITY_ID, NAME
219+'1' , '11733756.967038359493' , '9' , '1' , 'Orlando'
220+'2' , '11125299.370046524330' , '4' , '2' , 'New York'
221+'3' , '11125299.436561474576' , '6' , '3' , 'Toronto'
222+'5' , '11125299.423119541257' , '4' , '5' , 'San Luis Obispo'
223+'6' , '11125299.429148418828' , '5' , '6' , 'Salt Lake City'
224+'7' , '11125299.441440487280' , '4' , '7' , 'Kansas City'
225+'8' , '11125299.440038463100' , '3' , '8' , 'Bismarck'
226+'10' , '11296994.582311162725' , '1' , '300' , 'Springfield'
227+'11' , '11733755.998177478090' , '3' , '11' , 'Washington DC'
228+TABLE DEPARTMENT
229+_rowid, _timestamp, _version, DEPARTMENT_ID, NAME, PHONE, SECRETARY_ID
230+'1' , '11125299.410846965387' , '12' , '1' , 'Sales' , '5521' , NULL
231+'2' , '11125299.409506827592' , '4' , '2' , 'Engineering' , '5531' , NULL
232+TABLE EMPLOYEE
233+_rowid, _timestamp, _version, CITY_ID, DEPARTMENT_ID, EMPLOYEE_ID, EXTENSION, FIRSTNAME, LASTNAME
234+'52' , '21482695.351134277880' , '1' , '2' , '2' , '90' , '9032' , 'Mark' , 'Yellowford'
235+'33' , '11824000.298210268840' , '1' , '3' , '2' , '7878' , '2932' , 'Katie' , 'Mullholland'
236+'32' , '11733864.158240400254' , '1' , '11' , '2' , '69' , '6969' , 'Stan' , 'Foresight'
237+'31' , '11733666.934869606047' , '1' , '6' , '2' , '59' , '5555' , 'Catalin' , 'Poll'
238+'30' , '16134490.803055632860' , '5' , '5' , '2' , '89' , '2222' , 'Quentin' , 'Varquee'
239+'26' , '11733875.436699779704' , '4' , '11' , '1' , '2' , '9023' , 'Elisabeth' , 'Muskrat'
240+'25' , '11824025.344245314598' , '3' , '1' , '1' , '6' , '9932' , 'Juniper' , 'Beads'
241+'24' , '11725296.852966878563' , '3' , '6' , '1' , '7' , '2930' , 'Debbie' , 'Reynolds'
242+'23' , '11725305.505942394956' , '4' , '8' , '2' , '5' , '6609' , 'Marilyn' , 'Colburn'
243+'22' , '11721548.348074020817' , '1' , '7' , '2' , '3' , '4004' , 'Colby' , 'Smith'
244+'20' , '16132498.553308600560' , '4' , '1' , '2' , '1' , '1001' , 'Joseph' , 'Turner'
245+'39' , '16134802.706042600795' , '2' , '1' , '1' , '9095' , '23' , 'Tracy' , 'Davis'
246+'40' , '16132589.374745823442' , '2' , '1' , '1' , '9096' , '0033' , 'Michael' , 'Strongman'
247+'44' , '21482777.570284608751' , '4' , '1' , '1' , '666' , '666' , 'Jonathan' , 'Wensleydale'
248+'48' , '16149047.240697329863' , '1' , '1' , '1' , '9102' , '1234' , 'Peter' , 'Piper'
249+'49' , '16149221.292628999800' , '3' , '5' , '2' , '888' , '9876' , 'Theodore' , 'Bonn'
250+'50' , '17162220.083476159721' , '1' , '5' , '2' , '9890' , '9923' , 'Gweneth' , 'Pecan'
251+TABLE EO_PK_TABLE
252+_rowid, _timestamp, _version, NAME, PK
253+'1' , '16149047.143503218890' , '10' , 'EMPLOYEE' , '9102'
\ No newline at end of file
--- /dev/null
+++ b/sqlite-test/java-test/JdbcTest.java
@@ -0,0 +1,54 @@
1+import java.sql.Connection;
2+import java.sql.DriverManager;
3+import java.sql.ResultSet;
4+import java.sql.SQLException;
5+import java.sql.Statement;
6+
7+public class JdbcTest
8+{
9+ public static void main(String[] args) throws ClassNotFoundException
10+ {
11+ // load the sqlite-JDBC driver using the current class loader
12+ Class.forName("org.sqlite.JDBC");
13+
14+ Connection connection = null;
15+ try
16+ {
17+ // create a database connection
18+ connection = DriverManager.getConnection("jdbc:sqlite:C:/Users/dmotooka/AppData/sqlite/moto-test2.db");
19+ Statement statement = connection.createStatement();
20+ statement.setQueryTimeout(30); // set timeout to 30 sec.
21+
22+ statement.executeUpdate("drop table if exists person");
23+ statement.executeUpdate("create table person (id integer, name string)");
24+ statement.executeUpdate("insert into person values(1, 'leo')");
25+ statement.executeUpdate("insert into person values(2, 'yui')");
26+ ResultSet rs = statement.executeQuery("select * from person");
27+ while(rs.next())
28+ {
29+ // read the result set
30+ System.out.println("name = " + rs.getString("name"));
31+ System.out.println("id = " + rs.getInt("id"));
32+ }
33+ }
34+ catch(SQLException e)
35+ {
36+ // if the error message is "out of memory",
37+ // it probably means no database file is found
38+ System.err.println(e.getMessage());
39+ }
40+ finally
41+ {
42+ try
43+ {
44+ if(connection != null)
45+ connection.close();
46+ }
47+ catch(SQLException e)
48+ {
49+ // connection close failed.
50+ System.err.println(e);
51+ }
52+ }
53+ }
54+}
--- /dev/null
+++ b/sqlite-test/java-test/build.xml
@@ -0,0 +1,21 @@
1+<project name="jdbc-test" default="compile" basedir=".">
2+
3+ <!-- set global properties for this build -->
4+ <property environment="env"/>
5+ <property name="top" value="."/>
6+ <property name="src" value="."/>
7+ <property name="build" value="."/>
8+
9+ <property name="sqlite.jar" value="./sqlite-jdbc-3.7.2.jar"/>
10+
11+ <target name="compile">
12+ <!-- Compile the java code from ${src} into ${build} -->
13+ <javac
14+ srcdir="${top}/${src}"
15+ destdir="${build}"
16+ classpath="${sqlite.jar}"/>
17+ </target>
18+
19+ <target name="all" depends="compile"/>
20+
21+</project>
--- /dev/null
+++ b/sqlite-test/java-test/run.bat
@@ -0,0 +1,5 @@
1+@echo off
2+rem set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_21
3+set JAVA_HOME=C:\Users\dmotooka\AppData\jdk-7u45-windows-i586
4+
5+java -classpath ".;D:\UserData\Documents\01.proj\010.jal-mobile-dev\ws\db\java-test\sqlite-jdbc-3.7.2.jar" JdbcTest
\ No newline at end of file
Binary files /dev/null and b/sqlite-test/java-test/sqlite-jdbc-3.7.2.jar differ
--- /dev/null
+++ b/sqlite-test/sqlite-work.txt
@@ -0,0 +1,6 @@
1+
2+sqlite3.exe -init db-create.txt -echo moto-test2.db
3+
4+
5+sqlite3.exe moto-test2.db
6+
Binary files /dev/null and b/sqlite-test/sqlite3.exe differ