ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/index/VirtualConstructedTableIndex.java

Path
ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/index/VirtualConstructedTableIndex.java
Status
scanned
Type
file
Name
VirtualConstructedTableIndex.java
Extension
.java
Programming language
Java
Mime type
text/x-java
File type
Java source, ASCII text
Tag

      
    
Rootfs path

      
    
Size
2008 (2.0 KB)
MD5
529149807927c00ce9e81d972cc04244
SHA1
fcfef392354f33135a41c835b42eff2791f966a0
SHA256
948bafa6f2faaf453da91faca5c2281ed73d333d89986e4da3edeec70ed4adbd
SHA512

      
    
SHA1_git
e0c5cef3b43dfe973961342754e277b536f401fe
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
VirtualConstructedTableIndex.java | 2.0 KB |

/* * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0, * and the EPL 1.0 (https://h2database.com/html/license.html). * Initial Developer: H2 Group */ package org.h2.index; import org.h2.command.query.AllColumnsForPlan; import org.h2.engine.SessionLocal; import org.h2.message.DbException; import org.h2.result.SearchRow; import org.h2.result.SortOrder; import org.h2.table.FunctionTable; import org.h2.table.IndexColumn; import org.h2.table.TableFilter; import org.h2.table.VirtualConstructedTable; /** * An index for a virtual table that returns a result set. Search in this index * performs scan over all rows and should be avoided. */ public class VirtualConstructedTableIndex extends VirtualTableIndex { private final VirtualConstructedTable table; public VirtualConstructedTableIndex(VirtualConstructedTable table, IndexColumn[] columns) { super(table, null, columns); this.table = table; } @Override public boolean isFindUsingFullTableScan() { return true; } @Override public Cursor find(SessionLocal session, SearchRow first, SearchRow last) { return new VirtualTableCursor(this, first, last, table.getResult(session)); } @Override public double getCost(SessionLocal session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, AllColumnsForPlan allColumnsSet) { if (masks != null) { throw DbException.getUnsupportedException("Virtual table"); } long expectedRows; if (table.canGetRowCount(session)) { expectedRows = table.getRowCountApproximation(session); } else { expectedRows = database.getSettings().estimatedFunctionTableRows; } return expectedRows * 10; } @Override public String getPlanSQL() { return table instanceof FunctionTable ? "function" : "table scan"; } @Override public boolean canScan() { return false; } }
Detected license expression
mpl-2.0 AND epl-1.0
Detected license expression (SPDX)
MPL-2.0 AND EPL-1.0
Percentage of license text
4.69
Copyrights
- end_line: 2
  copyright: Copyright 2004-2023 H2 Group. Multiple-Licensed
  start_line: 2
Holders
- holder: H2 Group. Multiple-Licensed
  end_line: 2
  start_line: 2
Authors

      
    
License detections License expression License expression SPDX
mpl_2_0_and_epl_1_0-796bf8d7-f485-3520-923d-e6a4b1ecd2f3 mpl-2.0 AND epl-1.0 MPL-2.0 AND EPL-1.0
URL Start line End line
https://h2database.com/html/license.html 3 3
Package URL License Primary language
pkg:osgi/com.h2database.source@2.2.220