<?xml version="1.0" encoding="UTF-8" ?>
<!--

    Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
    Copyright (c) 2022-2022 Contributors to the Eclipse Foundation
    
    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<taglib xmlns="https://jakarta.ee/xml/ns/jakartaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-jsptaglibrary_3_0.xsd"
    version="3.0">
    
  <description>Tags 3.0 sql library</description>
  <display-name>Tags sql</display-name>
  <tlib-version>3.0</tlib-version>
  <short-name>sql</short-name>
  <uri>jakarta.tags.sql</uri>

  <validator>
    <description>
        Provides core validation features for JSTL tags.
    </description>
    <validator-class>
        org.apache.taglibs.standard.tlv.JstlSqlTLV
    </validator-class>
  </validator>

  <tag>
    <description>
        Provides nested database action elements with a shared Connection,
        set up to execute all statements as one transaction.
    </description>
    <name>transaction</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.sql.TransactionTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
        <description>
DataSource associated with the database to access. A
String value represents a relative path to a JNDI
resource or the parameters for the JDBC
DriverManager facility.
        </description>
        <name>dataSource</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <description>
Transaction isolation level. If not specified, it is the
isolation level the DataSource has been configured
with.
        </description>
        <name>isolation</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>

  <tag>
    <description>
        Executes the SQL query defined in its body or through the
        sql attribute.
    </description>
    <name>query</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.sql.QueryTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
        <description>
Name of the exported scoped variable for the
query result. The type of the scoped variable is
jakarta.servlet.jsp.jstl.sql.
Result (see Chapter 16 "Java APIs").
        </description>
        <name>var</name>
        <required>true</required>
        <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
        <description>
Scope of var.
        </description>
        <name>scope</name>
        <required>false</required>
        <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
        <description>
SQL query statement.
        </description>
        <name>sql</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <description>
Data source associated with the database to
query. A String value represents a relative path
to a JNDI resource or the parameters for the
DriverManager class.
        </description>
        <name>dataSource</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <description>
The returned Result object includes the rows
starting at the specified index. The first row of
the original query result set is at index 0. If not
specified, rows are included starting from the
first row at index 0.
        </description>
        <name>startRow</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <description>
The maximum number of rows to be included in
the query result. If not specified, or set to -1, no
limit on the maximum number of rows is
enforced.
        </description>
        <name>maxRows</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>

  <tag>
    <description>
        Executes the SQL update defined in its body or through the
        sql attribute.
    </description>
    <name>update</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.sql.UpdateTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
        <description>
Name of the exported scoped variable for the result
of the database update. The type of the scoped
variable is java.lang.Integer.
        </description>
        <name>var</name>
        <required>false</required>
        <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
        <description>
Scope of var.
        </description>
        <name>scope</name>
        <required>false</required>
        <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
        <description>
SQL update statement.
        </description>
        <name>sql</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <description>
Data source associated with the database to update.
A String value represents a relative path to a JNDI
resource or the parameters for the JDBC
DriverManager class.
        </description>
        <name>dataSource</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>

  <tag>
    <description>
        Sets a parameter in an SQL statement to the specified value.
    </description>
    <name>param</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.sql.ParamTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
        <description>
Parameter value.
        </description>
        <name>value</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>

  <tag>
    <description>
        Sets a parameter in an SQL statement to the specified java.util.Date value.
    </description>
    <name>dateParam</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.sql.DateParamTag</tag-class>
    <body-content>empty</body-content>
    <attribute>
        <description>
Parameter value for DATE, TIME, or
TIMESTAMP column in a database table.
        </description>
        <name>value</name>
        <required>true</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <description>
One of "date", "time" or "timestamp".
        </description>
        <name>type</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>

  <tag>
    <description>
        Creates a simple DataSource suitable only for prototyping.
    </description>
    <name>setDataSource</name>
    <tag-class>org.apache.taglibs.standard.tag.rt.sql.SetDataSourceTag</tag-class>
    <body-content>empty</body-content>
    <attribute>
        <description>
Name of the exported scoped variable
for the data source specified. Type can
be String or DataSource.
        </description>
        <name>var</name>
        <required>false</required>
        <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
        <description>
If var is specified, scope of the
exported variable. Otherwise, scope of
the data source configuration variable.
        </description>
        <name>scope</name>
        <required>false</required>
        <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
        <description>
Data source. If specified as a string, it
can either be a relative path to a JNDI
resource, or a JDBC parameters string
as defined in Section 10.1.1.
        </description>
        <name>dataSource</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <description>
JDBC parameter: driver class name.
        </description>
        <name>driver</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <description>
JDBC parameter: URL associated with
the database.
        </description>
        <name>url</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <description>
JDBC parameter: database user on
whose behalf the connection to the
database is being made.
        </description>
        <name>user</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <description>
JDBC parameter: user password
        </description>
        <name>password</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>
</taglib>
