Class SqlHelper
java.lang.Object
org.apache.camel.component.google.bigquery.sql.SqlHelper
-
Method Summary
Modifier and TypeMethodDescriptionextractParameterNames
(String query) Extracts list of parameters in form "@name" from query textstatic String
resolveQuery
(org.apache.camel.CamelContext camelContext, String query, String placeholder) Resolve the query by loading the query from the classpath or file resource if needed.static String
translateQuery
(String query, org.apache.camel.Exchange exchange) Replaces pattern in query in form of "${param}" with values from message header Raises an error if param value not found in headers
-
Method Details
-
resolveQuery
public static String resolveQuery(org.apache.camel.CamelContext camelContext, String query, String placeholder) throws org.apache.camel.NoTypeConversionAvailableException, IOException Resolve the query by loading the query from the classpath or file resource if needed.- Throws:
org.apache.camel.NoTypeConversionAvailableException
IOException
-
translateQuery
Replaces pattern in query in form of "${param}" with values from message header Raises an error if param value not found in headers- Parameters:
exchange
-- Returns:
- Translated query text
-
extractParameterNames
Extracts list of parameters in form "@name" from query text- Parameters:
query
-- Returns:
- list of parameter names
-