ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/result/SearchRow.java

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

      
    
Rootfs path

      
    
Size
3434 (3.4 KB)
MD5
07d34f374958a0f58ab2af51b3f6be17
SHA1
5eec769ef7b58483917b40c65c0effd62d1bc87d
SHA256
2cbaafe635070ce218c3589ff27061cf42f4ebe35457ef4da305f923e1ba877f
SHA512

      
    
SHA1_git
09a6baa2ec72c98f43f53b292072fcc84d86b385
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
SearchRow.java | 3.4 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.result; import org.h2.engine.CastDataProvider; import org.h2.value.CompareMode; import org.h2.value.TypeInfo; import org.h2.value.Value; import org.h2.value.ValueNull; /** * The base class for rows stored in a table, and for partial rows stored in the * index. */ public abstract class SearchRow extends Value { /** * Index of a virtual "_ROWID_" column within a row or a table */ public static final int ROWID_INDEX = -1; /** * If the key is this value, then the key is considered equal to all other * keys, when comparing. */ public static long MATCH_ALL_ROW_KEY = Long.MIN_VALUE + 1; /** * The constant that means "memory usage is unknown and needs to be calculated first". */ public static final int MEMORY_CALCULATE = -1; /** * The row key. */ protected long key; /** * Get the column count. * * @return the column count */ public abstract int getColumnCount(); /** * Determine if specified column contains NULL * @param index column index * @return true if NULL */ public boolean isNull(int index) { return getValue(index) == ValueNull.INSTANCE; } /** * Get the value for the column * * @param index the column number (starting with 0) * @return the value */ public abstract Value getValue(int index); /** * Set the value for given column * * @param index the column number (starting with 0) * @param v the new value */ public abstract void setValue(int index, Value v); /** * Set the unique key of the row. * * @param key the key */ public void setKey(long key) { this.key = key; } /** * Get the unique key of the row. * * @return the key */ public long getKey() { return key; } /** * Get the estimated memory used for this row, in bytes. * * @return the memory */ @Override public abstract int getMemory(); /** * Copy all relevant values from the source to this row. * @param source source of column values */ public abstract void copyFrom(SearchRow source); @Override public TypeInfo getType() { return TypeInfo.TYPE_ROW_EMPTY; } @Override public int getValueType() { return Value.ROW; } @Override public StringBuilder getSQL(StringBuilder builder, int sqlFlags) { builder.append("ROW ("); for (int index = 0, count = getColumnCount(); index < count; index++) { if (index != 0) { builder.append(", "); } getValue(index).getSQL(builder, sqlFlags); } return builder.append(')'); } @Override public String getString() { return getTraceSQL(); } @Override public int hashCode() { throw new UnsupportedOperationException(); } @Override public boolean equals(Object other) { throw new UnsupportedOperationException(); } @Override public int compareTypeSafe(Value v, CompareMode mode, CastDataProvider provider) { throw new UnsupportedOperationException(); } }
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
2.34
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