Module: Rufus::Tokyo::Ext

Public Visibility

Public Instance Method Summary

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

Calls a lua embedded function (http://tokyocabinet.

Public Instance Method Details

ext

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

Calls a lua embedded function (http://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.

[View source]


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
Generated on Friday, September 18 2009 at 10:35:42 AM by YARD 0.2.3.5 (ruby-1.8.7).