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

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

      
    
Rootfs path

      
    
Size
2139 (2.1 KB)
MD5
c0018d89aebeb7db9300d429d7324a5d
SHA1
53ec320b812f057f1773bf5109761a2bad505baf
SHA256
ff0758a0c1ee635afc939097cfa8846e3cb0f33bcb0a6eecfe178eb654c69603
SHA512

      
    
SHA1_git
1d9ad8aa4973e6c18507a5fc41718443e6961b5a
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
AggregateFunction.java | 2.1 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. * <p> * Please note this interface only has limited support for data types. * If you need data types that don't have a corresponding SQL type * (for example GEOMETRY), then use the {@link Aggregate} interface. * </p> */ public interface AggregateFunction { /** * 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 SQL type of the method, given the SQL 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 SQL type of the parameters, {@link java.sql.Types} * @return the SQL type of the result * @throws SQLException on failure */ int getType(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.21
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