01: /*
02:
03: Derby - Class org.apache.derby.iapi.sql.execute.ExecIndexRow
04:
05: Licensed to the Apache Software Foundation (ASF) under one or more
06: contributor license agreements. See the NOTICE file distributed with
07: this work for additional information regarding copyright ownership.
08: The ASF licenses this file to you under the Apache License, Version 2.0
09: (the "License"); you may not use this file except in compliance with
10: the License. You may obtain a copy of the License at
11:
12: http://www.apache.org/licenses/LICENSE-2.0
13:
14: Unless required by applicable law or agreed to in writing, software
15: distributed under the License is distributed on an "AS IS" BASIS,
16: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: See the License for the specific language governing permissions and
18: limitations under the License.
19:
20: */
21:
22: package org.apache.derby.iapi.sql.execute;
23:
24: /**
25: * This is an extension of ExecRow for use
26: * with indexes and sorting.
27: *
28: * @author jeff after ames
29: */
30: public interface ExecIndexRow extends ExecRow {
31:
32: /**
33: * These two methods are a sort of a hack. The store implements ordered
34: * null semantics for start and stop positioning, which is correct for
35: * IS NULL and incorrect for everything else. To work around this,
36: * TableScanResultSet will check whether the start and stop positions
37: * have NULL in any column position other than for an IS NULL check.
38: * If so, it won't do the scan (that is, it will return no rows).
39: *
40: * This method is to inform this ExecIndexRow (which can be used for
41: * start and stop positioning) that the given column uses ordered null
42: * semantics.
43: *
44: * @param columnPosition The position of the column that uses ordered
45: * null semantics (zero-based).
46: */
47: void orderedNulls(int columnPosition);
48:
49: /**
50: * Return true if orderedNulls was called on this ExecIndexRow for
51: * the given column position.
52: *
53: * @param columnPosition The position of the column (zero-based) for
54: * which we want to check if ordered null semantics
55: * are used.
56: *
57: * @return true if we are to use ordered null semantics on the given column
58: */
59: boolean areNullsOrdered(int columnPosition);
60:
61: /**
62: * Turn the ExecRow into an ExecIndexRow.
63: */
64: public void execRowToExecIndexRow(ExecRow valueRow);
65: }
|