コード例 #1
0
 @Override
 protected void Fill_stmt(Db_stmt stmt, int bgn, int end) {
   for (int i = bgn; i < end; i++) {
     Xowd_page_itm page = (Xowd_page_itm) hash.Get_at(i);
     stmt.Crt_int(page_tbl.Fld_page_ns(), page.Ns_id());
     stmt.Crt_bry_as_str(page_tbl.Fld_page_title(), page.Ttl_page_db());
   }
 }
コード例 #2
0
ファイル: Xoud_site_tbl.java プロジェクト: qq98982/xowa
 public void Update(
     int site_id, int priority, String domain, String name, String path, String xtn) {
   Db_stmt stmt = conn.Stmt_update_exclude(tbl_name, flds, fld_site_id);
   stmt.Val_int(fld_site_priority, priority)
       .Val_str(fld_site_domain, domain)
       .Val_str(fld_site_name, name)
       .Val_str(fld_site_path, path)
       .Val_str(fld_site_xtn, xtn)
       .Crt_int(fld_site_id, site_id)
       .Exec_update();
 }
コード例 #3
0
ファイル: Xoud_site_tbl.java プロジェクト: qq98982/xowa
 public void Insert(
     int site_id, int priority, String domain, String name, String path, String xtn) {
   Db_stmt stmt = conn.Stmt_insert(tbl_name, flds);
   stmt.Val_int(fld_site_id, site_id)
       .Val_int(fld_site_priority, priority)
       .Val_str(fld_site_domain, domain)
       .Val_str(fld_site_name, name)
       .Val_str(fld_site_path, path)
       .Val_str(fld_site_xtn, xtn)
       .Exec_insert();
 }
コード例 #4
0
 public void Insert(
     Xoh_page hpg, Xoh_stat_itm hzip, int wtxt_len, int row_orig_len, int row_zip_len) {
   Xopg_module_mgr js_mgr = hpg.Head_mgr();
   if (stmt_insert == null) stmt_insert = conn.Stmt_insert(tbl_name, flds);
   stmt_insert.Clear()
       .Val_int(fld_page_id, hpg.Page_id())
       .Val_int(fld_wtxt_len, wtxt_len)
       .Val_int(fld_row_orig_len, row_orig_len)
       .Val_int(fld_row_zip_len, row_zip_len)
       .Val_int(fld_body_len, Len_or_0(hpg.Db().Html().Html_bry()))
       .Val_int(fld_display_ttl_len, Len_or_0(hpg.Display_ttl()))
       .Val_int(fld_content_sub_len, Len_or_0(hpg.Content_sub()))
       .Val_int(fld_sidebar_div_len, Len_or_0(hpg.Sidebar_div()))
       .Val_bool_as_byte(fld_js_math, js_mgr.Math_exists())
       .Val_bool_as_byte(fld_js_imap, js_mgr.Imap_exists())
       .Val_bool_as_byte(fld_js_packed, js_mgr.Gallery_packed_exists())
       .Val_bool_as_byte(fld_js_hiero, js_mgr.Hiero_exists())
       .Val_int(fld_a_rhs, hzip.A_rhs())
       .Val_int(fld_lnki_text_n, hzip.Lnki_text_n())
       .Val_int(fld_lnki_text_y, hzip.Lnki_text_y())
       .Val_int(fld_lnke_free, hzip.Lnke__free())
       .Val_int(fld_lnke_auto, hzip.Lnke__auto())
       .Val_int(fld_lnke_text, hzip.Lnke__text())
       .Val_int(fld_hdr_1, hzip.Hdr_1())
       .Val_int(fld_hdr_2, hzip.Hdr_2())
       .Val_int(fld_hdr_3, hzip.Hdr_3())
       .Val_int(fld_hdr_4, hzip.Hdr_4())
       .Val_int(fld_hdr_5, hzip.Hdr_5())
       .Val_int(fld_hdr_6, hzip.Hdr_6())
       .Val_int(fld_img_full, hzip.Img_full())
       .Exec_insert();
 }
コード例 #5
0
 public void Insert(
     int step_id,
     int host_id,
     byte[] wiki_abrv,
     String wiki_date,
     String import_name,
     int import_type,
     byte zip_type,
     byte[] md5,
     long size_zip,
     long size_raw,
     long prog_size_end,
     int prog_count_end) {
   if (insert_stmt == null) insert_stmt = conn.Stmt_insert(tbl_name, flds);
   insert_stmt.Clear()
       .Val_int(fld_step_id, step_id)
       .Val_int(fld_host_id, host_id)
       .Val_bry_as_str(fld_wiki_abrv, wiki_abrv)
       .Val_str(fld_wiki_date, wiki_date)
       .Val_str(fld_import_name, import_name)
       .Val_int(fld_import_type, import_type)
       .Val_byte(fld_import_zip, zip_type)
       .Val_long(fld_import_size_zip, size_zip)
       .Val_long(fld_import_size_raw, size_raw)
       .Val_bry_as_str(fld_import_md5, md5)
       .Val_long(fld_prog_size_end, prog_size_end)
       .Val_int(fld_prog_count_end, prog_count_end)
       .Exec_insert();
 }
コード例 #6
0
  public void Split__trg__nth__rls(Split_ctx ctx, Db_conn trg_conn) {
    // make rndm_rng and add
    Rndm_rng_itm rng_itm = bldr.Exec_rng_end_or_null();
    if (rng_itm == null) return;
    Rndm_rng_tbl rng_tbl = new Rndm_rng_tbl(trg_conn);
    rng_tbl.Create_tbl();
    Db_stmt rng_stmt = rng_tbl.Insert_stmt();
    rng_tbl.Insert(
        rng_stmt, rng_itm.Mgr_idx(), rng_itm.Rng_idx(), rng_itm.Seq_bgn(), rng_itm.Seq_end());
    rng_stmt.Rls();
    bldr.Conn().Txn_end();

    // make rndm_seq and bulk copy
    Rndm_seq_tbl seq_tbl = new Rndm_seq_tbl(trg_conn);
    seq_tbl.Create_tbl();
    Split_tbl_.Bld_insert_by_select(tmp_bfr, seq_tbl.Tbl_name(), seq_tbl.Flds());
    tmp_bfr.Add_str_u8_fmt(
        "WHERE {0} = {1} AND {2} = {3}",
        seq_tbl.Fld__qry_idx(), bldr.Qry_idx(), seq_tbl.Fld__rng_idx(), bldr.Rng_idx());
    attach_mgr.Conn_main_(trg_conn).Conn_links_(new Db_attach_itm("src_db", bldr.Conn()));
    attach_mgr.Exec_sql(tmp_bfr.To_str_and_clear());
    //			bldr.Conn().Txn_bgn("rndm");
  }
コード例 #7
0
ファイル: Xoud_site_tbl.java プロジェクト: qq98982/xowa
 public void Delete(int site_id) {
   Db_stmt stmt = conn.Stmt_delete(tbl_name, fld_site_id);
   stmt.Crt_int(fld_site_id, site_id).Exec_delete();
 }
コード例 #8
0
 public static void Insert(Db_stmt stmt, byte status, int id, byte wkr_tid, String wkr_msg) {
   stmt.Clear().Val_int(id).Val_byte(status).Val_byte(wkr_tid).Val_str(wkr_msg).Exec_insert();
 }