Module: Groonga
- Defined in:
- lib/groonga.rb,
lib/groonga/index.rb,
lib/groonga/column.rb,
lib/groonga/dumper.rb,
lib/groonga/logger.rb,
lib/groonga/record.rb,
lib/groonga/schema.rb,
lib/groonga/context.rb,
lib/groonga/posting.rb,
lib/groonga/database.rb,
lib/groonga/geo-point.rb,
lib/groonga/pagination.rb,
lib/groonga/grntest-log.rb,
lib/groonga/memory-pool.rb,
lib/groonga/sub-records.rb,
lib/groonga/index-column.rb,
lib/groonga/query-logger.rb,
lib/groonga/patricia-trie.rb,
lib/groonga/database-inspector.rb,
lib/groonga/expression-builder.rb,
lib/groonga/context/command-executor.rb,
ext/groonga/rb-groonga.c
Overview
Copyright (C) 2015 Masafumi Yokoyama yokoyama@clear-code.com Copyright (C) 2009-2016 Kouhei Sutou kou@clear-code.com
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Defined Under Namespace
Modules: DefaultCache, Dumper, Encoding, EncodingSupport, Flushable, GeoPointValueConverter, GrntestLog, Pagination, ProcedureType, RequestCanceler, RequestTimer Classes: Accessor, AddressIsInUse, AddressIsNotAvailable, ArgumentListTooLong, Array, ArrayCursor, BadAddress, BadFileDescriptor, BrokenPipe, CASError, CallbackLogger, CallbackQueryLogger, Cancel, Closed, Column, ColumnCache, CommandError, Config, ConnectionRefused, Context, DataColumn, Database, DatabaseDumper, DatabaseInspector, DirectoryNotEmpty, DomainError, DoubleArrayTrie, DoubleArrayTrieCursor, EndOfData, EqualOperator, Error, ExecFormatError, Expression, FileCorrupt, FileExists, FileLogger, FileQueryLogger, FileTooLarge, FilenameTooLong, FixSizeColumn, FunctionNotImplemented, GeoPoint, GreaterEqualOperator, GreaterOperator, Hash, HashCursor, ID, IllegalByteSequence, ImproperLink, InappropriateIOControlOperation, IncompatibleFileFormat, Index, IndexColumn, IndexColumnDumper, IndexCursor, InputOutputError, InterruptedFunctionCall, InvalidArgument, InvalidFormat, InvalidSeek, InvertedIndexCursor, IsADirectory, LZ4Error, LessEqualOperator, LessOperator, Logger, MatchOperator, MemoryPool, Name, NetworkIsDown, NoBuffer, NoChildProcesses, NoLocksAvailable, NoMemoryAvailable, NoSpaceLeftOnDevice, NoSuchColumn, NoSuchDevice, NoSuchDeviceOrAddress, NoSuchFileOrDirectory, NoSuchProcess, Normalizer, NormalizerError, NotADirectory, NotEnoughSpace, NotEqualOperator, NotSocket, Object, ObjectCorrupt, OperationNotPermitted, OperationNotSupported, OperationTimeout, OperationWouldBlock, Operator, PatriciaTrie, PatriciaTrieCursor, PermissionDenied, Plugin, PluginError, Posting, PrefixOperator, Procedure, QueryLogger, RangeError, ReadOnlyFileSystem, Record, RegexpOperator, RequestTimerID, ResourceBusy, ResourceDeadlockAvoided, ResourceTemporarilyUnavailable, ResultTooLarge, RetryMax, Schema, SchemaDumper, ScorerError, Snippet, SocketIsAlreadyConnected, SocketIsAlreadyShutdowned, SocketIsNotConnected, SocketNotInitialized, StackOverFlow, SubRecords, SyntaxError, Table, TableCursor, TableDumper, Thread, TokenFilterError, TokenizerError, TokyoGeoPoint, TooLargeOffset, TooLargePage, TooManyLinks, TooManyOpenFiles, TooManyOpenFilesInSystem, TooManySymbolicLinks, TooSmallLimit, TooSmallOffset, TooSmallPage, TooSmallPageSize, Type, UnknownError, UnsupportedCommandVersion, UpdateNotAllowed, Variable, VariableSizeColumn, WGS84GeoPoint, WindowFunctionError, WindowsEventLogger, ZLibError, ZstdError
Constant Summary
- VERSION =
利用しているgroongaのバージョン。 @[メジャーバージョ ン, マイナーバージョン, マイクロバージョン, タグ]@ の 配列。
runtime_version
- BUILD_VERSION =
ビルドしたgroongaのバージョン。 @[メジャーバージョン, マイナーバージョン, マイクロバージョン]@ の配列。
build_version
- BINDINGS_VERSION =
rroongaのバージョン。 @[メジャーバージョン, マ イナーバージョン, マイクロバージョン]@ の配列。
bindings_version
- Conf =
For backward compatibility.
cGrnConfig
- Operation =
Deprecated.
backward compatibility.
rb_cGrnOperator
- ObjectClosed =
Deprecated.
Use Closed instead since 1.2.3.
groongaレベルでは破棄されているが、Rubyレベルでは生き ているオブジェクトにアクセスすると発生する。
rb_eGrnClosed
Class Method Summary collapse
-
.[](name) ⇒ Object
call-seq: Groonga[name] -> Groonga::Object or nil Groonga[id] -> Groonga::Object or nil.
-
.bindings_version ⇒ Object
BINDINGS_VERSIONを”.”で結合して“メジャーバージョン.マ イナーバージョン.マイクロバージョン”という形式の文 字列にしたもの。.
-
.build_version ⇒ Object
BUILD_VERSIONを”.”で結合して“メジャーバージョン.マ イナーバージョン.マイクロバージョン”という形式の 文字列にしたもの。.
-
.error_message ⇒ String?
-
.lock_timeout ⇒ Integer
Returns the current lock timeout.
-
.lock_timeout=(timeout) ⇒ Object
Sets the current lock timeout.
-
.package_label ⇒ String
Returns the Groonga package’s label.
-
.version ⇒ String
Format version.
Class Method Details
.[](name) ⇒ Object
call-seq: Groonga[name] -> Groonga::Object or nil Groonga[id] -> Groonga::Object or nil
便利メソッド。Groonga::Context.default[name]と同じ。
92 93 94 |
# File 'lib/groonga.rb', line 92 def [](name) Context.default[name] end |
.bindings_version ⇒ Object
BINDINGS_VERSIONを”.”で結合して“メジャーバージョン.マ イナーバージョン.マイクロバージョン”という形式の文 字列にしたもの。
82 83 84 |
# File 'lib/groonga.rb', line 82 def bindings_version BINDINGS_VERSION.join(".") end |
.build_version ⇒ Object
BUILD_VERSIONを”.”で結合して“メジャーバージョン.マ イナーバージョン.マイクロバージョン”という形式の 文字列にしたもの。
63 64 65 |
# File 'lib/groonga.rb', line 63 def build_version BUILD_VERSION.join(".") end |
.error_message ⇒ String?
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'ext/groonga/rb-groonga.c', line 40
static VALUE
rb_grn_s_get_error_message (VALUE klass)
{
const char *message;
message = grn_get_global_error_message();
if (message[0] == '\0') {
return Qnil;
} else {
grn_encoding encoding = grn_get_default_encoding();
return rb_enc_str_new_cstr(message,
rb_grn_encoding_to_ruby_encoding(encoding));
}
}
|
.lock_timeout ⇒ Integer
Returns the current lock timeout.
See http://groonga.org/docs/reference/api/global_configurations.html about lock timeout.
150 151 152 153 154 |
# File 'ext/groonga/rb-groonga.c', line 150
static VALUE
rb_grn_s_get_lock_timeout (VALUE klass)
{
return INT2NUM(grn_get_lock_timeout());
}
|
.lock_timeout=(timeout) ⇒ Object
Sets the current lock timeout.
165 166 167 168 169 170 |
# File 'ext/groonga/rb-groonga.c', line 165
static VALUE
rb_grn_s_set_lock_timeout (VALUE klass, VALUE timeout)
{
grn_set_lock_timeout(NUM2INT(timeout));
return Qnil;
}
|
.package_label ⇒ String
Returns the Groonga package’s label. It’s "Groonga"
.
192 193 194 195 196 |
# File 'ext/groonga/rb-groonga.c', line 192
static VALUE
rb_grn_s_get_package_label (VALUE klass)
{
return rb_str_new_cstr(grn_get_package_label());
}
|
.version ⇒ String
Format version.
71 72 73 74 75 76 |
# File 'lib/groonga.rb', line 71 def version major, minor, micro, tag = VERSION version_string = [major, minor, micro].join(".") version_string << "-#{tag}" if tag version_string end |