<L_SQL> : Relational database location

Java class : leon.info.location.LySqlLocation

ROLE

This element enables to parameter the connection to a relational database.

ATTRIBUTES

<!ATTLIST L_SQL
	  id ID #IMPLIED
	  condition CDATA #IMPLIED
	  javaName NMTOKEN #IMPLIED
	  url CDATA #REQUIRED
	  driver CDATA #REQUIRED
	  user CDATA #IMPLIED
	  password CDATA #IMPLIED
	  dbName CDATA #IMPLIED
	  nbConnection CDATA #IMPLIED
	  valueSep CDATA #IMPLIED
	  metadata CDATA #IMPLIED
	  trim CDATA #IMPLIED>
Attribute Mand. Description Default
id no Identifier of the data location. The default value is the identifier of the application.  
condition no The value of this attribute enables to control the existence of this location. This condition refers to a property defined or not inside the initialisation file of the application. If the property does not exists or equals false or equals 0, this location is no taken into account. This attribute may be used to manage several connections and several applications inside a same system.  
javaName no Full name of the Java class that defines the data provider used to connect and get data from this location. The value depends on the database type:
- SYBASE: leon.peer.sql.sybase.LySybaseDataProvider;
- MYSQL: leon.peer.sql.mysql.LyMySqlDataProvider;
- ORACLE: leon.peer.sql.oracle.LyOracleDataProvider;
- ACCESS: leon.peer.sql.access.LyAccessDataProvider;
- Other database: leon.peer.sql.LySqlDataProvider;
Usually, it is not needed to define this provider as database types are recognized from the name of the driver. This class should inherit from the leon.peer.LyDataProvider class and have a constructor with two parameters: LyApplication and LyLocation. In the context of the L_SQL tag, this class usually inherits from the leon.peer.sql.LySqlDataProvider class in order to add specific treatments in addition to those of the driver.
 
url yes URL used to connect to the database.  
driver yes Name of the Java class that defines the JDBC driver.  
user no User name used to connect to the database.  
password no Password used to connect to the database.  
dbName no Name of the database.  
nbConnection no Number of connections that are created and added inside the pool of connections. The default value is 1.  
valueSep no Character used as a separator for multiple values. The default value is '\n'. ()  
metadata no This attribute tells if the database metadata must be used to create the physical layer.  
trim no This attribute tells if white spaces from both ends of values coming from the database are removed. The default value is false.  

ELEMENTS

<!ELEMENT L_SQL 
	  (NOTIFIER |
	   NOTIFIER_REF)?>
Element Mand. Mult. Description
NOTIFIER yes no Notification service associated to this location.
NOTIFIER_REF yes no Reference of the notification service associated to this location.

SAMPLE

<L_SQL id="sample"
	 url="jdbc:sybase:Tds:lyria002:2638"
	 driver="com.sybase.jdbc.SybDriver"
	 user="sample"
	 password="sample"
	 dbName="sample"/>