ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/api/Aggregate.java

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

      
    
Rootfs path

      
    
Size
2000 (2.0 KB)
MD5
f817e13a3c9e28a34fe81c72fcdf2ab7
SHA1
b925a56db0e833b3a974578fe4e8e1a6d8d66fd1
SHA256
89cd16359983411f17f4811cf006a834662091136619593db576b9ea20c74639
SHA512

      
    
SHA1_git
c5bd31f5903a77704c99bc98d9c47adb6193635f
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
Aggregate.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.api; import java.sql.Connection; import java.sql.SQLException; /** * A user-defined aggregate function needs to implement this interface. * The class must be public and must have a public non-argument constructor. */ public interface Aggregate { /** * This method is called when the aggregate function is used. * A new object is created for each invocation. * * @param conn a connection to the database * @throws SQLException on SQL exception */ default void init(Connection conn) throws SQLException { // Do nothing by default } /** * This method must return the H2 data type, {@link org.h2.value.Value}, * of the aggregate function, given the H2 data type of the input data. * The method should check here if the number of parameters * passed is correct, and if not it should throw an exception. * * @param inputTypes the H2 data type of the parameters, * @return the H2 data type of the result * @throws SQLException if the number/type of parameters passed is incorrect */ int getInternalType(int[] inputTypes) throws SQLException; /** * This method is called once for each row. * If the aggregate function is called with multiple parameters, * those are passed as array. * * @param value the value(s) for this row * @throws SQLException on failure */ void add(Object value) throws SQLException; /** * This method returns the computed aggregate value. This method must * preserve previously added values and must be able to reevaluate result if * more values were added since its previous invocation. * * @return the aggregated value * @throws SQLException on failure */ Object getResult() throws SQLException; }
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
3.52
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