Module: Rufus::Tokyo::Ext
- Included in:
- Tyrant, TyrantTable
- Defined in:
- lib/rufus/tokyo/tyrant/ext.rb
Instance Method Summary collapse
-
#ext(func_name, key = '', value = '', opts = {}) ⇒ Object
Calls a lua embedded function (tokyocabinet.sourceforge.net/tyrantdoc/#luaext).
Instance Method Details
#ext(func_name, key = '', value = '', opts = {}) ⇒ Object
Calls a lua embedded function (tokyocabinet.sourceforge.net/tyrantdoc/#luaext)
Options are :global_locking and :record_locking
Returns the return value of the called function.
Nil is returned in case of failure.
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/rufus/tokyo/tyrant/ext.rb', line 39 def ext (func_name, key='', value='', opts={}) k = key.to_s v = value.to_s outlen_op( :tcrdbext, func_name.to_s, compute_ext_opts(opts), k, Rufus::Tokyo.blen(k), v, Rufus::Tokyo.blen(v)) end |