<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Kouhei Sutou <kou****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2012-08-06 13:37:15 +0900 (Mon, 06 Aug 2012)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d">6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Log</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em">bq: throw exception for no field and value</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#diff-0">lib/bq-translator.js</a></li>
<li><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#diff-1">test/bq-translator.test.js</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/bq-translator.js (+6 -2)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0L124">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0L125">125</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0L126">126</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0L127">127</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0L128">128</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0L129">129</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0L130">130</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0L131">131</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0L132">132</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0R124">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0R125">125</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0R126">126</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0R127">127</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0R128">128</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0R129">129</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0R130">130</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0R131">131</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0R132">132</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0R133">133</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0R134">134</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0R135">135</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L0R136">136</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -125,8 +125,12 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">BooleanQueryTranslator.prototype = {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return expression;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> } else if (character == ")") {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- // TODO: report error: field and value is missing</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- return "";</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (field.length == 0) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ this.throwTranslateError("field is missing");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ } else {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ this.throwTranslateError("field value is missing: " +</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "field:<" + field + ">");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> } else {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> // TODO: report error: invalid field character</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return "";</span>
</pre>
</td>
</tr>
</tbody>
</table>
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: test/bq-translator.test.js (+8 -0)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1L150">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1L151">151</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1L152">152</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1L153">153</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1L154">154</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1L155">155</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1L156">156</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R150">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R151">151</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R152">152</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R153">153</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R154">154</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R155">155</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R156">156</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R157">157</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R158">158</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R159">159</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R160">160</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R161">161</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R162">162</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R163">163</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/6f0047f0a7ff48e8fc175fecb53cbfcd6ad17f3d#L1R164">164</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -151,6 +151,14 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">suite('BoolanQueryTranslator', function() {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "(field f1 'k1' 'garbage')",</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "(field f1 'k1' |'|garbage')",</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "a garbage character after value: <'>");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ testGroupError("field: no field",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "(field )",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "(field |)|",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "field is missing");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ testGroupError("field: no value",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "(field f1)",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "(field f1|)|",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "field value is missing: field:<f1>");</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> testExpression("value only: stirng: and: space",</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "'keyword1 keyword2' 'other keyword'",</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>