ESQL: Data Type of the specified SQL, esqlsql Data Type

Source: Internet
Author: User

ESQL: Data Type of the specified SQL, esqlsql Data Type

When using an SQL statement, you must specify the data type required by the current SQL statement.For example, the expression used in the above example@{Sys: date: datetime}. We have extended the syntax.

Start character

Schoolbag name

Delimiter

Keywords

Delimiter

Type

Terminator

@{

Id

:

Key

:

Type

}

WebEasy supports almost all data types in JDBC2.0 and combines the same or similar types to simplify developers' writing. The following table lists the specified methods for all data types:

Type

Expression

Description

String

@{Id: key: string}

String type

Memo

@{Id: key: memo}

Text types in complex formats (such as HTML)

Int

@{Id: key: int}

Integer

Long

@{Id: key: long}

Long Integer

Float

@{Id: key: float}

Floating Point Type

Double

@{Id: key: double}

Double Precision type

Boolean

@{Id: key: boolean}

Boolean

Numeric

@{Id: key: numeric}

Number Type

Date

@{Id: key: date}

Date type

Time

@{Id: key: time}

Time Type

Datetime

@{Id: key: datetime}

Datetime type

Timestamp

@{Id: key: timestamp}

Timestamp type (accurate to milliseconds)

Binary

@{Id: key: binary}

Binary

Link

@{Id: key: link}

Link Type

The example of the specified data type has already appeared multiple times in the previous document.

OrLight B2C e-commerce websites(Blog_add_save.chtml under the site \ blog directory)

Insert

<ESql module=base act=edit commit=true>Insert Into favorite_base(we_id,title,words,content,words_content)Values(@{doc:we_id:int},@{pPage:title:string},@{pPage:words:string},@{pPage:content:memo},@{pPage:words_content:memo})</ESql>
The reason for doing so is very simple. When you want to insert text in complicated formats (such as HMTL) to the database, it can easily avoid conflicts between special symbols and SQL reserved words (such as greater than, less than, and single double quotation marks) and ensure normal insertion.

Try it yourself

Download and description of light platform Resources

Platform free download: http://download.csdn.net/detail/tx18/8381859

Latest Development Manual download: http://download.csdn.net/detail/tx18/8411089

Development Instance:Light B2C e-commerce websites, Free download: http://download.csdn.net/detail/tx18/8318585

The light-Open Platform will occasionally upgrade to provide more powerful and Easy functions for you. Please pay attention to the latestDevelopment Manual


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.