Package com.mckoi.database
Class INHelper
- java.lang.Object
-
- com.mckoi.database.INHelper
-
final class INHelper extends java.lang.Object
This is a static class that provides methods for performing the Query table command 'in' and 'not in'. This command finds a match between one of the columns in two tables. If match between a cell in one column is also found in the column of the other table, the row is included in the resultant table (or discluded (is that a word?) for 'not in').
-
-
Constructor Summary
Constructors Constructor Description INHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static IntegerVector
in(Table table1, Table table2, int[] t1_cols, int[] t2_cols)
A multi-column version of IN.(package private) static IntegerVector
in(Table table1, Table table2, int column1, int column2)
This implements the 'in' command.(package private) static IntegerVector
notIn(Table table1, Table table2, int[] t1_cols, int[] t2_cols)
A multi-column version of NOT IN.(package private) static IntegerVector
notIn(Table table1, Table table2, int col1, int col2)
This implements the 'not_in' command.(package private) static IntegerVector
origIn(Table table1, Table table2, int column1, int column2)
This implements the 'in' command.
-
-
-
Method Detail
-
origIn
static final IntegerVector origIn(Table table1, Table table2, int column1, int column2)
This implements the 'in' command. Returns the rows selected from table1.NOTE: This is actually an incorrect implementation. We only keep for compatibility with DQL system. The may return multiple values from 'table1'
-
in
static final IntegerVector in(Table table1, Table table2, int column1, int column2)
This implements the 'in' command. Returns the rows selected from table1. This correctly implements the 'in' relation. The 'origIn' implementation may return multiple rows from the largest table.
-
in
static final IntegerVector in(Table table1, Table table2, int[] t1_cols, int[] t2_cols)
A multi-column version of IN.
-
notIn
static final IntegerVector notIn(Table table1, Table table2, int col1, int col2)
This implements the 'not_in' command. ISSUE: This will be less efficient than 'in' if table1 has many rows and table2 has few rows.
-
notIn
static final IntegerVector notIn(Table table1, Table table2, int[] t1_cols, int[] t2_cols)
A multi-column version of NOT IN.
-
-