This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 773662bc7547 camel-sql: add javadoc to SqlOutputType enum constants 
(#25572)
773662bc7547 is described below

commit 773662bc7547204b0421fbb6ffbb8afc2b97616c
Author: Jose Montoya <[email protected]>
AuthorDate: Mon Aug 24 07:50:16 2026 -0500

    camel-sql: add javadoc to SqlOutputType enum constants (#25572)
    
    chore: add javadoc to SqlOutputType enum constants
    
    Document what each output type (SelectOne, SelectList, StreamList)
    produces for the SQL producer and consumer, based on the existing
    behavior in DefaultSqlEndpoint/SqlProducer/SqlConsumer.
    
    Co-authored-by: Claude Sonnet 5 <[email protected]>
---
 .../apache/camel/component/sql/SqlOutputType.java  | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git 
a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlOutputType.java
 
b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlOutputType.java
index a9a7303c1bbc..c2f461501d6b 100644
--- 
a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlOutputType.java
+++ 
b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlOutputType.java
@@ -16,9 +16,35 @@
  */
 package org.apache.camel.component.sql;
 
+/**
+ * The type of output produced by the SQL producer and consumer for the result 
of a query.
+ */
 public enum SqlOutputType {
 
+    /**
+     * Returns the result of the query as a single object.
+     * <p>
+     * If the query has only a single column, the value of that column is 
returned (for example
+     * {@code SELECT COUNT(*) FROM PROJECT} returns a {@link Long}). If the 
query has more than one
+     * column, a {@link java.util.Map} of the row is returned. If {@code 
outputClass} is set, the row
+     * is instead converted into a Java bean of that type by calling the 
setters that match the column
+     * names; the class must have a default constructor.
+     * <p>
+     * If the query returns more than one row, a non-unique result exception 
is thrown.
+     */
     SelectOne,
+
+    /**
+     * Returns the result of the query as a {@link java.util.List} of {@link 
java.util.Map}, one map per
+     * row keyed by column name. If {@code outputClass} is set, each row is 
instead converted into a Java
+     * bean of that type by calling the setters that match the column names.
+     */
     SelectList,
+
+    /**
+     * Streams the result of the query using an {@link java.util.Iterator}, so 
rows are read from the
+     * {@link java.sql.ResultSet} lazily instead of being loaded into memory 
all at once. This can be
+     * combined with the Splitter EIP in streaming mode to process the result 
set in a streaming fashion.
+     */
     StreamList
 }

Reply via email to