rroonga 1.3.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. data/Gemfile +1 -1
  2. data/Rakefile +2 -7
  3. data/bug.rb +36 -0
  4. data/crash.rb +17 -0
  5. data/ext/groonga/Makefile +260 -0
  6. data/ext/groonga/groonga.so +0 -0
  7. data/ext/groonga/rb-grn-accessor.o +0 -0
  8. data/ext/groonga/rb-grn-array-cursor.o +0 -0
  9. data/ext/groonga/rb-grn-array.o +0 -0
  10. data/ext/groonga/rb-grn-column.c +34 -37
  11. data/ext/groonga/rb-grn-column.o +0 -0
  12. data/ext/groonga/rb-grn-context.c +63 -2
  13. data/ext/groonga/rb-grn-context.o +0 -0
  14. data/ext/groonga/rb-grn-database.o +0 -0
  15. data/ext/groonga/rb-grn-double-array-trie-cursor.o +0 -0
  16. data/ext/groonga/rb-grn-double-array-trie.o +0 -0
  17. data/ext/groonga/rb-grn-encoding-support.o +0 -0
  18. data/ext/groonga/rb-grn-encoding.o +0 -0
  19. data/ext/groonga/rb-grn-exception.o +0 -0
  20. data/ext/groonga/rb-grn-expression-builder.o +0 -0
  21. data/ext/groonga/rb-grn-expression.c +21 -13
  22. data/ext/groonga/rb-grn-expression.o +0 -0
  23. data/ext/groonga/rb-grn-fix-size-column.o +0 -0
  24. data/ext/groonga/rb-grn-hash-cursor.o +0 -0
  25. data/ext/groonga/rb-grn-hash.o +0 -0
  26. data/ext/groonga/rb-grn-index-column.o +0 -0
  27. data/ext/groonga/rb-grn-index-cursor.o +0 -0
  28. data/ext/groonga/rb-grn-logger.o +0 -0
  29. data/ext/groonga/rb-grn-object.c +2 -0
  30. data/ext/groonga/rb-grn-object.o +0 -0
  31. data/ext/groonga/rb-grn-operator.o +0 -0
  32. data/ext/groonga/rb-grn-patricia-trie-cursor.o +0 -0
  33. data/ext/groonga/rb-grn-patricia-trie.o +0 -0
  34. data/ext/groonga/rb-grn-plugin.o +0 -0
  35. data/ext/groonga/rb-grn-posting.o +0 -0
  36. data/ext/groonga/rb-grn-procedure.o +0 -0
  37. data/ext/groonga/rb-grn-record.o +0 -0
  38. data/ext/groonga/rb-grn-snippet.o +0 -0
  39. data/ext/groonga/rb-grn-table-cursor-key-support.o +0 -0
  40. data/ext/groonga/rb-grn-table-cursor.o +0 -0
  41. data/ext/groonga/rb-grn-table-key-support.o +0 -0
  42. data/ext/groonga/rb-grn-table.c +57 -51
  43. data/ext/groonga/rb-grn-table.o +0 -0
  44. data/ext/groonga/rb-grn-type.o +0 -0
  45. data/ext/groonga/rb-grn-utils.o +0 -0
  46. data/ext/groonga/rb-grn-variable-size-column.o +0 -0
  47. data/ext/groonga/rb-grn-variable.o +0 -0
  48. data/ext/groonga/rb-grn-view-accessor.o +0 -0
  49. data/ext/groonga/rb-grn-view-cursor.o +0 -0
  50. data/ext/groonga/rb-grn-view-record.o +0 -0
  51. data/ext/groonga/rb-grn-view.o +0 -0
  52. data/ext/groonga/rb-grn.h +10 -4
  53. data/ext/groonga/rb-groonga.o +0 -0
  54. data/lib/groonga.rb +9 -6
  55. data/lib/groonga/schema.rb +75 -46
  56. data/rroonga-build.rb +2 -2
  57. data/test/run-test.rb +1 -2
  58. data/test/test-table-select.rb +0 -5
  59. data/test/test-type.rb +2 -2
  60. data/test/test-version.rb +40 -10
  61. metadata +198 -191
data/Gemfile CHANGED
@@ -21,7 +21,7 @@ gem 'pkg-config'
21
21
  gem 'json'
22
22
 
23
23
  group :development, :test do
24
- gem "test-unit"
24
+ gem "test-unit", ">= 2.4.6"
25
25
  gem "test-unit-notify"
26
26
  gem "rake"
27
27
  gem "rake-compiler"
data/Rakefile CHANGED
@@ -104,10 +104,6 @@ Gem::PackageTask.new(spec) do |pkg|
104
104
  end
105
105
 
106
106
  document_task = Packnga::DocumentTask.new(spec) do |t|
107
- t.yard do |yard_task|
108
- yard_task.files += FileList["ext/**/*.c"]
109
- yard_task.options += ["--markup", "textile"]
110
- end
111
107
  end
112
108
 
113
109
  namespace :reference do
@@ -131,7 +127,7 @@ module YARD
131
127
  class Proxy
132
128
  alias_method :initialize_original, :initialize
133
129
  def initialize(namespace, name)
134
- name = name.gsub(/\AGrn(.*)\z/) do
130
+ name = name.to_s.gsub(/\AGrn(.*)\z/) do
135
131
  suffix = $1
136
132
  case suffix
137
133
  when ""
@@ -203,10 +199,9 @@ end
203
199
 
204
200
  Rake::ExtensionTask.new("groonga", spec) do |ext|
205
201
  if groonga_win32_i386_p
206
- ext.cross_platform = ["x86-mingw32", "i386-mswin32"]
202
+ ext.cross_platform = ["x86-mingw32"]
207
203
  else
208
204
  ext.cross_platform = ["x64-mingw32"]
209
- # ext.cross_platform << "x64-mswin64" # We need to build with VC++ 2010. :<
210
205
  end
211
206
  if windows?
212
207
  ext.gem_spec.files += collect_binary_files(relative_binary_dir)
data/bug.rb ADDED
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'fileutils'
4
+ require 'groonga'
5
+
6
+ Groonga::Logger.log_path = "/tmp/groonga.log"
7
+ Groonga::Logger.query_log_path = "/tmp/groonga-query.log"
8
+
9
+ i = 0
10
+ loop do
11
+ path = "/tmp/db/db"
12
+ FileUtils.rm_rf(File.dirname(path))
13
+ FileUtils.mkdir_p(File.dirname(path))
14
+ Groonga::Context.default = nil
15
+ database = Groonga::Database.create(:path => path)
16
+ Groonga::Schema.define do |schema|
17
+ schema.create_table("Users",
18
+ :type => :hash,
19
+ :key_type => "ShortText") do |table|
20
+ table.uint32("name_length")
21
+ end
22
+ end
23
+
24
+ users = Groonga["Users"]
25
+ 10.times do
26
+ i += 1
27
+ exit if i > 100
28
+ name = i.to_s
29
+ users.add(name, :name_length => name.length)
30
+ end
31
+ builder = Groonga::RecordExpressionBuilder.new(users, nil)
32
+ builder.query = "name_length:3"
33
+ builder.build
34
+ database.close
35
+ GC.start
36
+ end
data/crash.rb ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'groonga'
4
+
5
+ context = Groonga::Context.default
6
+ context.connect(:port => 10042)
7
+
8
+ 10000.times do |i|
9
+ p i
10
+ GC.stress = true
11
+ result = context.select("Program")
12
+ result.records.each do |record|
13
+ record["_key"]
14
+ record["unknown"]
15
+ end
16
+ GC.stress = false
17
+ end
@@ -0,0 +1,260 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ # V=0 quiet, V=1 verbose. other values don't work.
5
+ V = 0
6
+ Q1 = $(V:1=)
7
+ Q = $(Q1:0=@)
8
+ n=$(NULLCMD)
9
+ ECHO1 = $(V:1=@$n)
10
+ ECHO = $(ECHO1:0=@echo)
11
+
12
+ #### Start of system configuration section. ####
13
+
14
+ srcdir = /home/kou/work/ruby/rroonga/ext/groonga
15
+ topdir = /usr/include/ruby-1.9.1
16
+ hdrdir = /usr/include/ruby-1.9.1
17
+ arch_hdrdir = /usr/include/ruby-1.9.1/$(arch)
18
+ VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
19
+ prefix = $(DESTDIR)/usr
20
+ rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
21
+ exec_prefix = $(prefix)
22
+ vendorhdrdir = $(rubyhdrdir)/vendor_ruby
23
+ sitehdrdir = $(rubyhdrdir)/site_ruby
24
+ rubyhdrdir = $(includedir)/$(RUBY_BASE_NAME)-$(ruby_version)
25
+ vendordir = $(DESTDIR)/usr/lib/ruby/vendor_ruby
26
+ sitedir = $(DESTDIR)/usr/local/lib/site_ruby
27
+ ridir = $(datarootdir)/$(RI_BASE_NAME)
28
+ mandir = $(prefix)/share/man
29
+ localedir = $(datarootdir)/locale
30
+ libdir = $(exec_prefix)/lib
31
+ psdir = $(docdir)
32
+ pdfdir = $(docdir)
33
+ dvidir = $(docdir)
34
+ htmldir = $(docdir)
35
+ infodir = $(prefix)/share/info
36
+ docdir = $(datarootdir)/doc/$(PACKAGE)
37
+ oldincludedir = $(DESTDIR)/usr/include
38
+ includedir = $(prefix)/include
39
+ localstatedir = $(DESTDIR)/var
40
+ sharedstatedir = $(prefix)/com
41
+ sysconfdir = $(DESTDIR)/etc
42
+ datadir = $(datarootdir)
43
+ datarootdir = $(prefix)/share
44
+ libexecdir = $(prefix)/lib/ruby1.9.1
45
+ sbindir = $(exec_prefix)/sbin
46
+ bindir = $(exec_prefix)/bin
47
+ rubylibdir = $(rubylibprefix)/$(ruby_version)
48
+ archdir = $(rubylibdir)/$(arch)
49
+ sitelibdir = $(sitedir)/$(ruby_version)
50
+ sitearchdir = $(sitelibdir)/$(sitearch)
51
+ vendorlibdir = $(vendordir)/$(ruby_version)
52
+ vendorarchdir = $(vendorlibdir)/$(sitearch)
53
+
54
+ NULLCMD = :
55
+
56
+ CC = gcc
57
+ CXX = g++
58
+ LIBRUBY = $(LIBRUBY_SO)
59
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
60
+ LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
61
+ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
62
+ OUTFLAG = -o
63
+ COUTFLAG = -o
64
+
65
+ RUBY_EXTCONF_H =
66
+ cflags = $(optflags) $(debugflags) $(warnflags)
67
+ optflags = -O3
68
+ debugflags = -ggdb
69
+ warnflags = -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
70
+ CFLAGS = -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -Wall -I/tmp/local/include/groonga
71
+ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
72
+ DEFS =
73
+ CPPFLAGS = -DRB_GRN_COMPILATION -DGRN_MAJOR_VERSION=1 -DGRN_MINOR_VERSION=3 -DGRN_MICRO_VERSION=0 -DHAVE_RB_ERRINFO -DHAVE_TYPE_ENUM_RUBY_VALUE_TYPE $(DEFS) $(cppflags)
74
+ CXXFLAGS = $(CFLAGS) -fno-strict-aliasing -g
75
+ ldflags = -L. -rdynamic -Wl,-export-dynamic -L/tmp/local/lib
76
+ dldflags =
77
+ ARCH_FLAG =
78
+ DLDFLAGS = $(ldflags) $(dldflags)
79
+ LDSHARED = $(CC) -shared
80
+ LDSHAREDXX = $(CXX) -shared
81
+ AR = ar
82
+ EXEEXT =
83
+
84
+ RUBY_BASE_NAME = ruby
85
+ RUBY_INSTALL_NAME = ruby1.9.1
86
+ RUBY_SO_NAME = ruby-1.9.1
87
+ arch = x86_64-linux
88
+ sitearch = $(arch)
89
+ ruby_version = 1.9.1
90
+ ruby = /usr/bin/ruby1.9.1
91
+ RUBY = $(ruby)
92
+ RM = rm -f
93
+ RM_RF = $(RUBY) -run -e rm -- -rf
94
+ RMDIRS = rmdir --ignore-fail-on-non-empty -p
95
+ MAKEDIRS = /bin/mkdir -p
96
+ INSTALL = /usr/bin/install -c
97
+ INSTALL_PROG = $(INSTALL) -m 0755
98
+ INSTALL_DATA = $(INSTALL) -m 644
99
+ COPY = cp
100
+
101
+ #### End of system configuration section. ####
102
+
103
+ preload =
104
+
105
+ libpath = . $(libdir)
106
+ LIBPATH = -L. -L$(libdir)
107
+ DEFFILE =
108
+
109
+ CLEANFILES = mkmf.log
110
+ DISTCLEANFILES =
111
+ DISTCLEANDIRS =
112
+
113
+ extout =
114
+ extout_prefix =
115
+ target_prefix =
116
+ LOCAL_LIBS =
117
+ LIBS = $(LIBRUBYARG_SHARED) -lgroonga -lpthread -lrt -ldl -lcrypt -lm -lc
118
+ SRCS = rb-grn-procedure.c rb-grn-column.c rb-grn-index-column.c rb-grn-encoding-support.c rb-grn-variable.c rb-grn-table.c rb-grn-hash-cursor.c rb-grn-table-cursor-key-support.c rb-grn-object.c rb-grn-double-array-trie.c rb-grn-view-accessor.c rb-grn-table-key-support.c rb-grn-array.c rb-grn-patricia-trie.c rb-grn-double-array-trie-cursor.c rb-grn-utils.c rb-grn-record.c rb-groonga.c rb-grn-exception.c rb-grn-variable-size-column.c rb-grn-encoding.c rb-grn-expression-builder.c rb-grn-operator.c rb-grn-snippet.c rb-grn-array-cursor.c rb-grn-type.c rb-grn-table-cursor.c rb-grn-fix-size-column.c rb-grn-view-cursor.c rb-grn-logger.c rb-grn-plugin.c rb-grn-database.c rb-grn-view-record.c rb-grn-patricia-trie-cursor.c rb-grn-index-cursor.c rb-grn-view.c rb-grn-accessor.c rb-grn-context.c rb-grn-posting.c rb-grn-expression.c rb-grn-hash.c
119
+ OBJS = rb-grn-procedure.o rb-grn-column.o rb-grn-index-column.o rb-grn-encoding-support.o rb-grn-variable.o rb-grn-table.o rb-grn-hash-cursor.o rb-grn-table-cursor-key-support.o rb-grn-object.o rb-grn-double-array-trie.o rb-grn-view-accessor.o rb-grn-table-key-support.o rb-grn-array.o rb-grn-patricia-trie.o rb-grn-double-array-trie-cursor.o rb-grn-utils.o rb-grn-record.o rb-groonga.o rb-grn-exception.o rb-grn-variable-size-column.o rb-grn-encoding.o rb-grn-expression-builder.o rb-grn-operator.o rb-grn-snippet.o rb-grn-array-cursor.o rb-grn-type.o rb-grn-table-cursor.o rb-grn-fix-size-column.o rb-grn-view-cursor.o rb-grn-logger.o rb-grn-plugin.o rb-grn-database.o rb-grn-view-record.o rb-grn-patricia-trie-cursor.o rb-grn-index-cursor.o rb-grn-view.o rb-grn-accessor.o rb-grn-context.o rb-grn-posting.o rb-grn-expression.o rb-grn-hash.o
120
+ TARGET = groonga
121
+ DLLIB = $(TARGET).so
122
+ EXTSTATIC =
123
+ STATIC_LIB =
124
+
125
+ BINDIR = $(bindir)
126
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
127
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
128
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
129
+ HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
130
+ ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
131
+
132
+ TARGET_SO = $(DLLIB)
133
+ CLEANLIBS = $(TARGET).so
134
+ CLEANOBJS = *.o *.bak
135
+
136
+ all: $(DLLIB)
137
+ static: $(STATIC_LIB)
138
+ .PHONY: all install static install-so install-rb
139
+ .PHONY: clean clean-so clean-rb
140
+
141
+ clean-rb-default::
142
+ clean-rb::
143
+ clean-so::
144
+ clean: clean-so clean-rb-default clean-rb
145
+ @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
146
+
147
+ distclean-rb-default::
148
+ distclean-rb::
149
+ distclean-so::
150
+ distclean: clean distclean-so distclean-rb-default distclean-rb
151
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
152
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
153
+ @-$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
154
+
155
+ realclean: distclean
156
+ install: install-so install-rb
157
+
158
+ install-so: $(RUBYARCHDIR)
159
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
160
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
161
+ @-$(MAKEDIRS) $(@D)
162
+ $(INSTALL_PROG) $(DLLIB) $(@D)
163
+ install-rb: pre-install-rb install-rb-default
164
+ install-rb-default: pre-install-rb-default
165
+ pre-install-rb: Makefile
166
+ pre-install-rb-default: Makefile
167
+ pre-install-rb-default:
168
+ $(ECHO) installing default groonga libraries
169
+ pre-install-rb: $(RUBYLIBDIR)/groonga
170
+ install-rb: $(RUBYLIBDIR)/groonga/schema.rb $(RUBYLIBDIR)/groonga
171
+ $(RUBYLIBDIR)/groonga/schema.rb: $(srcdir)/../../lib/groonga/schema.rb
172
+ $(Q) $(INSTALL_DATA) $(srcdir)/../../lib/groonga/schema.rb $(@D)
173
+ install-rb: $(RUBYLIBDIR)/groonga/expression-builder-19.rb $(RUBYLIBDIR)/groonga
174
+ $(RUBYLIBDIR)/groonga/expression-builder-19.rb: $(srcdir)/../../lib/groonga/expression-builder-19.rb
175
+ $(Q) $(INSTALL_DATA) $(srcdir)/../../lib/groonga/expression-builder-19.rb $(@D)
176
+ install-rb: $(RUBYLIBDIR)/groonga/pagination.rb $(RUBYLIBDIR)/groonga
177
+ $(RUBYLIBDIR)/groonga/pagination.rb: $(srcdir)/../../lib/groonga/pagination.rb
178
+ $(Q) $(INSTALL_DATA) $(srcdir)/../../lib/groonga/pagination.rb $(@D)
179
+ install-rb: $(RUBYLIBDIR)/groonga/view-record.rb $(RUBYLIBDIR)/groonga
180
+ $(RUBYLIBDIR)/groonga/view-record.rb: $(srcdir)/../../lib/groonga/view-record.rb
181
+ $(Q) $(INSTALL_DATA) $(srcdir)/../../lib/groonga/view-record.rb $(@D)
182
+ install-rb: $(RUBYLIBDIR)/groonga/query-log.rb $(RUBYLIBDIR)/groonga
183
+ $(RUBYLIBDIR)/groonga/query-log.rb: $(srcdir)/../../lib/groonga/query-log.rb
184
+ $(Q) $(INSTALL_DATA) $(srcdir)/../../lib/groonga/query-log.rb $(@D)
185
+ install-rb: $(RUBYLIBDIR)/groonga/patricia-trie.rb $(RUBYLIBDIR)/groonga
186
+ $(RUBYLIBDIR)/groonga/patricia-trie.rb: $(srcdir)/../../lib/groonga/patricia-trie.rb
187
+ $(Q) $(INSTALL_DATA) $(srcdir)/../../lib/groonga/patricia-trie.rb $(@D)
188
+ install-rb: $(RUBYLIBDIR)/groonga/grntest-log.rb $(RUBYLIBDIR)/groonga
189
+ $(RUBYLIBDIR)/groonga/grntest-log.rb: $(srcdir)/../../lib/groonga/grntest-log.rb
190
+ $(Q) $(INSTALL_DATA) $(srcdir)/../../lib/groonga/grntest-log.rb $(@D)
191
+ install-rb: $(RUBYLIBDIR)/groonga/dumper.rb $(RUBYLIBDIR)/groonga
192
+ $(RUBYLIBDIR)/groonga/dumper.rb: $(srcdir)/../../lib/groonga/dumper.rb
193
+ $(Q) $(INSTALL_DATA) $(srcdir)/../../lib/groonga/dumper.rb $(@D)
194
+ install-rb: $(RUBYLIBDIR)/groonga/posting.rb $(RUBYLIBDIR)/groonga
195
+ $(RUBYLIBDIR)/groonga/posting.rb: $(srcdir)/../../lib/groonga/posting.rb
196
+ $(Q) $(INSTALL_DATA) $(srcdir)/../../lib/groonga/posting.rb $(@D)
197
+ install-rb: $(RUBYLIBDIR)/groonga/context.rb $(RUBYLIBDIR)/groonga
198
+ $(RUBYLIBDIR)/groonga/context.rb: $(srcdir)/../../lib/groonga/context.rb
199
+ $(Q) $(INSTALL_DATA) $(srcdir)/../../lib/groonga/context.rb $(@D)
200
+ install-rb: $(RUBYLIBDIR)/groonga/record.rb $(RUBYLIBDIR)/groonga
201
+ $(RUBYLIBDIR)/groonga/record.rb: $(srcdir)/../../lib/groonga/record.rb
202
+ $(Q) $(INSTALL_DATA) $(srcdir)/../../lib/groonga/record.rb $(@D)
203
+ install-rb: $(RUBYLIBDIR)/groonga/expression-builder.rb $(RUBYLIBDIR)/groonga
204
+ $(RUBYLIBDIR)/groonga/expression-builder.rb: $(srcdir)/../../lib/groonga/expression-builder.rb
205
+ $(Q) $(INSTALL_DATA) $(srcdir)/../../lib/groonga/expression-builder.rb $(@D)
206
+ pre-install-rb: $(RUBYLIBDIR)
207
+ install-rb: $(RUBYLIBDIR)/groonga.rb $(RUBYLIBDIR)
208
+ $(RUBYLIBDIR)/groonga.rb: $(srcdir)/../../lib/groonga.rb
209
+ $(Q) $(INSTALL_DATA) $(srcdir)/../../lib/groonga.rb $(@D)
210
+ pre-install-rb:
211
+ $(ECHO) installing groonga libraries
212
+ $(RUBYARCHDIR):
213
+ $(Q) $(MAKEDIRS) $@
214
+ $(RUBYLIBDIR)/groonga:
215
+ $(Q) $(MAKEDIRS) $@
216
+ $(RUBYLIBDIR):
217
+ $(Q) $(MAKEDIRS) $@
218
+
219
+ site-install: site-install-so site-install-rb
220
+ site-install-so: install-so
221
+ site-install-rb: install-rb
222
+
223
+ .SUFFIXES: .c .m .cc .mm .cxx .cpp .C .o
224
+
225
+ .cc.o:
226
+ $(ECHO) compiling $(<)
227
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
228
+
229
+ .mm.o:
230
+ $(ECHO) compiling $(<)
231
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
232
+
233
+ .cxx.o:
234
+ $(ECHO) compiling $(<)
235
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
236
+
237
+ .cpp.o:
238
+ $(ECHO) compiling $(<)
239
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
240
+
241
+ .C.o:
242
+ $(ECHO) compiling $(<)
243
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
244
+
245
+ .c.o:
246
+ $(ECHO) compiling $(<)
247
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
248
+
249
+ .m.o:
250
+ $(ECHO) compiling $(<)
251
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
252
+
253
+ $(DLLIB): $(OBJS) Makefile
254
+ $(ECHO) linking shared-object $(DLLIB)
255
+ @-$(RM) $(@)
256
+ $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
257
+
258
+
259
+
260
+ $(OBJS): $(hdrdir)/ruby.h $(hdrdir)/ruby/defines.h $(arch_hdrdir)/ruby/config.h
Binary file
Binary file
Binary file
Binary file
@@ -179,51 +179,48 @@ rb_grn_column_get_local_name (VALUE self)
179
179
  * ているGroonga::Expressionを取得できる。
180
180
  * Groonga::Expression#snippetを使うことにより、指定した条件
181
181
  * 用のスニペットを簡単に生成できる。
182
- * <pre>
183
- * results = description_column.select do |column|
184
- * column =~ "groonga"
185
- * end
186
- * snippet = results.expression.snippet([["<em>", "</em>"]])
187
- * results.each do |record|
188
- * puts "#{record['name']}の説明文の中で「groonga」が含まれる部分"
189
- * snippet.execute(record["description"].each do |snippet|
190
- * puts "---"
191
- * puts "#{snippet}..."
192
- * puts "---"
193
- * end
182
+ *
183
+ * bc. !!!ruby
184
+ * results = description_column.select do |column|
185
+ * column =~ "groonga"
186
+ * end
187
+ * snippet = results.expression.snippet([["<em>", "</em>"]])
188
+ * results.each do |record|
189
+ * puts "#{record['name']}の説明文の中で「groonga」が含まれる部分"
190
+ * snippet.execute(record["description"]).each do |snippet|
191
+ * puts "---"
192
+ * puts "#{snippet}..."
193
+ * puts "---"
194
194
  * end
195
+ * end
196
+ *
195
197
  * 出力例
196
- * Ruby/groongaの説明文の中で「groonga」が含まれる部分
197
- * ---
198
- * Ruby/<em>groonga</em>は<em>groonga</em>のいわゆるDB-APIの層の...
199
- * ---
200
- * </pre>
198
+ *
199
+ * pre. rroongaの説明文の中で「groonga」が含まれる部分
200
+ * ---
201
+ * rroongaは<em>groonga</em>のいわゆるDB-APIの層の...
202
+ * ---
201
203
  *
202
204
  * _query_ には「[カラム名]:[演算子][値]」という書式で条件を
203
205
  * 指定する。演算子は以下の通り。
204
206
  *
205
- * [なし]
206
- * [カラム値] == [値]
207
- * [<tt>!</tt>]
208
- * [カラム値] != [値]
209
- * [<tt><</tt>]
210
- * [カラム値] < [値]
211
- * [<tt>></tt>]
212
- * [カラム値] > [値]
213
- * [<tt><=</tt>]
214
- * [カラム値] <= [値]
215
- * [<tt>>=</tt>]
216
- * [カラム値] >= [値]
217
- * [<tt>@</tt>]
218
- * [カラム値]が[値]を含んでいるかどうか
207
+ * - なし := [カラム値] == [値]
208
+ * - @!@ := [カラム値] != [値]
209
+ * - @<@ := [カラム値] < [値]
210
+ * - @>@ := [カラム値] > [値]
211
+ * - @<=@ := [カラム値] <= [値]
212
+ * - @>=@ := [カラム値] >= [値]
213
+ * - @@@ := [カラム値]が[値]を含んでいるかどうか
219
214
  *
220
215
  * 例:
221
- * "groonga" # _column_ カラムの値が"groonga"のレコードにマッチ
222
- * "name:daijiro" # _column_ カラムが属しているテーブルの
223
- * # "name"カラムの値が"daijiro"のレコードにマッチ
224
- * "description:@groonga" # _column_ カラムが属しているテーブルの
225
- * # "description"カラムが
226
- * # "groonga"を含んでいるレコードにマッチ
216
+ *
217
+ * - @"groonga"@ := _column_ カラムの値が @"groonga"@ のレコードにマッチ
218
+ * - @"name:daijiro"@ :=
219
+ * _column_ カラムが属しているテーブルの @"name"@ カラムの値が
220
+ * @"daijiro"@ のレコードにマッチ =:
221
+ * - @"description:@@@groonga"@ :=
222
+ * _column_ カラムが属しているテーブルの @"description"@ カラムが
223
+ * @"groonga"@ を含んでいるレコードにマッチ =:
227
224
  *
228
225
  * _expression_ には既に作成済みのGroonga::Expressionを渡す
229
226
  *