All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hi.siddhi-extension-event-table.3.2.3.source-code.rdbms-table-config.xml Maven / Gradle / Ivy

There is a newer version: 3.2.13
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ WSO2 Inc. licenses this file to you under the Apache License,
  ~ Version 2.0 (the "License"); you may not use this file except
  ~ in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied. See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
<!--

 Please consider following queries.

 - "INSERT INTO alerts_history ( id,information,latitude,longitude,state,timeStamp) VALUES (?,?,?,?,?,?)"
 - "CREATE TABLE alerts_history (ID  varchar2(255),INFORMATION  varchar2(255),LATITUDE  BINARY_DOUBLE,LONGITUDE  BINARY_DOUBLE,STATE  varchar2(255),TIMESTAMP  varchar2(255))"
 - "UPDATE alerts_history SET information = ?  , latitude = ?  , longitude = ?  , state = ?  , timeStamp = ?  WHERE id = ? "

 Following attributes corresponds to following values

 $TABLE_NAME - alerts_history
 $COLUMN_TYPES - ID  varchar2(255),INFORMATION  varchar2(255),LATITUDE  BINARY_DOUBLE,LONGITUDE  BINARY_DOUBLE,STATE  varchar2(255),TIMESTAMP  varchar2(255)
 $COLUMNS - id,information,latitude,longitude,state,timeStamp
 $VALUES - ?,?,?,?,?,?
 $COLOUMN_VALUES - information = ?  , latitude = ?  , longitude = ?  , state = ?  , timeStamp = ?
 $CONDITION - id = ?
-->

<eventTableConfiguration>
    <mappings>
        <mapping>
            <elements>
                <element key="string">VARCHAR(255)</element>
                <element key="double">DOUBLE</element>
                <element key="integer">INT</element>
                <element key="long">BIGINT</element>
                <element key="float">FLOAT</element>
                <element key="bool">BOOL</element>
                <element key="createTable">CREATE TABLE $TABLE_NAME ($COLUMN_TYPES)</element>
                <element key="insertDataToTable">INSERT INTO $TABLE_NAME ($COLUMNS) VALUES ($VALUES)</element>
                <element key="isTableExist">SELECT * FROM $TABLE_NAME limit 1</element>
                <element key="updateTableRow">UPDATE $TABLE_NAME SET $COLUMN_VALUES WHERE $CONDITION</element>
                <element key="deleteTableRow">DELETE FROM $TABLE_NAME WHERE $CONDITION</element>
                <element key="selectTableRow">SELECT * FROM $TABLE_NAME WHERE $CONDITION</element>
                <element key="isTableRowExist">SELECT * FROM $TABLE_NAME WHERE $CONDITION limit 1</element>
                <element key="limitSelectRow">SELECT * FROM $TABLE_NAME limit 0 , $VALUES</element>
                <element key="comma">,</element>
                <element key="questionMark">?</element>
                <element key="equal">=</element>
                <element key="greaterThan">&gt;</element>
                <element key="lessThan">&lt;</element>
                <element key="lessThanEqual">&lt;=</element>
                <element key="greaterThanEqual">&gt;=</element>
                <element key="notEqual">!=</element>
                <element key="and">AND</element>
                <element key="or">OR</element>
                <element key="not">NOT</element>
                <element key="isNull">IS NULL</element>
            </elements>
        </mapping>
        <mapping db='mysql'>
            <elements>
                <element key="bool">TINYINT</element>
            </elements>
        </mapping>
        <mapping db='postgresql'>
            <elements>
               	<element key="bool">SMALLINT</element>
				<element key="integer">INTEGER</element>
            </elements>
        </mapping>
        <mapping db='oracle'>
            <elements>
                <element key="string">varchar2(255)</element>
                <element key="long">NUMBER(19)</element>
                <element key="double">NUMBER(19,4)</element>
                <element key="integer">NUMBER(10)</element>
                <element key="float">NUMBER(19,4)</element>
                <element key="isTableExist">SELECT * FROM $TABLE_NAME WHERE ROWNUM = 1</element>
                <element key="isTableRowExist">SELECT * FROM $TABLE_NAME WHERE $CONDITION</element>
            </elements>
        </mapping>
        <mapping db='microsoft sql server'>
            <elements>
                <element key="string">varchar(255)</element>
                <element key="long">NUMERIC(19)</element>
                <element key="integer">INTEGER</element>
                <element key="float">FLOAT(16)</element>
                <element key="bool">BIT</element>
                <element key="isTableExist">SELECT TOP(1) * FROM $TABLE_NAME</element>
                <element key="isTableRowExist">SELECT TOP(1) * FROM $TABLE_NAME WHERE $CONDITION</element>
                <element key="limitSelectRow">SELECT TOP(1) * FROM $TABLE_NAME, $VALUES</element>
            </elements>
        </mapping>
        <mapping db='h2'>
            <elements>
                <element key="integer">varchar2(255)</element>
                <element key="long">REAL</element>
            </elements>
        </mapping>
    </mappings>
</eventTableConfiguration>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy