Module Rufus::Tokyo::Ext

  1. lib/rufus/tokyo/tyrant/ext.rb

Methods

public instance

  1. ext

Public instance methods

ext (func_name, key='', value='', opts={})

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.

[show source]
    # File lib/rufus/tokyo/tyrant/ext.rb, line 39
39:     def ext (func_name, key='', value='', opts={})
40: 
41:       k = key.to_s
42:       v = value.to_s
43: 
44:       outlen_op(
45:         :tcrdbext,
46:         func_name.to_s,
47:         compute_ext_opts(opts),
48:         k, Rufus::Tokyo.blen(k),
49:         v, Rufus::Tokyo.blen(v))
50:     end