Class: IdZebra::Repository

Inherits:
Struct
  • Object
show all
Includes:
Native
Defined in:
lib/idzebra.rb

Constant Summary

Constants included from Native

Native::UPDATE_ACTIONS

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#zebra_handleObject

Returns the value of attribute zebra_handle

Returns:

  • (Object)

    the current value of zebra_handle



104
105
106
# File 'lib/idzebra.rb', line 104

def zebra_handle
  @zebra_handle
end

Instance Method Details

#add_record(record_str) ⇒ Object



123
124
125
# File 'lib/idzebra.rb', line 123

def add_record(record_str)
  zebra_add_record(zebra_handle, record_str, 0)
end

#cleanObject



115
116
117
# File 'lib/idzebra.rb', line 115

def clean
  zebra_clean(zebra_handle)
end

#commitObject



119
120
121
# File 'lib/idzebra.rb', line 119

def commit
  zebra_commit(zebra_handle)
end

#compactObject



111
112
113
# File 'lib/idzebra.rb', line 111

def compact
  zebra_compact(zebra_handle)
end

#delete_record(record_str) ⇒ Object



132
133
134
135
# File 'lib/idzebra.rb', line 132

def delete_record(record_str)
  zebra_update_record(zebra_handle, 
    :action_delete, nil, 0, nil, nil, record_str, 0)
end

#initObject



107
108
109
# File 'lib/idzebra.rb', line 107

def init
  zebra_init(zebra_handle)
end

#update_record(record_str) ⇒ Object



127
128
129
130
# File 'lib/idzebra.rb', line 127

def update_record(record_str)
  zebra_update_record(zebra_handle, 
    :action_update, nil, 0, nil, nil, record_str, 0)
end