/* * Document-method: clear_lock * * call-seq: * column.clear_lock(options={}) * * _column_のロックを強制的に解除する。 * * 利用可能なオプションは以下の通り。 * * [_:id_] * _:id_で指定したレコードのロックを強制的に解除する。 * (注: groonga側が未実装のため、現在は無視される。実装さ * れるのではないかと思っているが、実装されないかもしれな * い。) */ static VALUE rb_grn_column_clear_lock (int argc, VALUE *argv, VALUE self) { grn_id id = GRN_ID_NIL; grn_ctx *context; grn_obj *column; VALUE options, rb_id; rb_scan_args(argc, argv, "01", &options); rb_grn_column_deconstruct(SELF(self), &column, &context, NULL, NULL, NULL, NULL, NULL); rb_grn_scan_options(options, "id", &rb_id, NULL); if (!NIL_P(rb_id)) id = NUM2UINT(rb_id); grn_obj_clear_lock(context, column); return Qnil; }
/* * _database_ のロックを強制的に解除する。 * * @overload clear_lock */ static VALUE rb_grn_database_clear_lock (VALUE self) { grn_ctx *context; grn_obj *database; rb_grn_database_deconstruct(SELF(self), &database, &context, NULL, NULL, NULL, NULL); grn_obj_clear_lock(context, database); return Qnil; }