Database Components Hxj.data (ix) (Other dbsession introduction)

Source: Internet
Author: User

This section describes other simple helper methods for dbsession.

Sum method

Dbsession.default.sum<products> (products._. UnitPrice, Products._. CategoryID = = 2);

Returns the UnitPrice total for categroyid=2.

Avg Method

Dbsession.default.avg<products> (products._. UnitPrice, Products._. CategoryID = = 2);

Returns the average of the UnitPrice of the categroyid=2.

Count method

Dbsession.default.count<products> (products._. All, products._. CategoryID = = 2);

Returns the number of record bars for the categroyid=2.

Max method

Dbsession.default.max<products> (products._. UnitPrice, Products._. CategoryID = = 2);

Returns the largest unitprice in a categroyid=2 record.

Min method

Dbsession.default.min<products> (products._. UnitPrice, Products._. CategoryID = = 2);

Returns the smallest UnitPrice in a categroyid=2 record.

There are few ways to assist, just a few.

The next section describes how to output the SQL that the component executes.

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.