1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2014-08-03 23:31:22 -04:00
parent 7b6e65b088
commit fb8c06c560
191 changed files with 1869 additions and 722 deletions

View File

@@ -59,11 +59,10 @@ public class Sqlite_engine_ {
int len = idxs.length;
p.Txn_mgr().Txn_end_all(); // commit any pending transactions
for (int i = 0; i < len; i++) {
p.Txn_mgr().Txn_bgn_if_none();
String index = idxs[i].Xto_sql();
usr_dlg.Prog_many("", "", "creating index: ~{0} ~{1}", file_id, index);
usr_dlg.Plog_many("", "", "creating index: ~{0} ~{1}", file_id, index);
p.Exec_qry(Db_qry_sql.ddl_(index));
p.Txn_mgr().Txn_end_all();
usr_dlg.Log_many("", "", "index created: ~{0} ~{1}", file_id, index);
}
}
public static Db_provider Provider_load_or_fail_(Io_url url) {

View File

@@ -25,6 +25,7 @@ import java.sql.*;
public class SqliteDbMain {
public static void main(String[] args) throws Exception {
SqliteDbMain main = new SqliteDbMain();
// main.JdbcInit(args);
// main.Read();
// main.Mass_upload(Io_url_.new_dir_("J:\\gplx\\xowl\\file\\all#meta\\en.wikipedia.org\\"));
// main.CreateMany(20, 0);
@@ -38,6 +39,15 @@ public class SqliteDbMain {
'5719' '174'
'5766' '173'
*/
// private void JdbcInit(String[] args) {
// try {
// Class.forName("SQLite.JDBCDriver");
// }
// catch (Exception e) {
// ConsoleAdp._.WriteLine(e.getMessage());
// }
// }
private void CreateMany(int number, int base_val) {
long time_bgn = Env_.TickCount();
Db_provider provider = Sqlite_engine_.Provider_load_or_make_(Io_url_.new_fil_("E:\\test.sqlite3"));