Aggregates Overview

Phần lớn web applications cần phải fetch data từ database
Aggregates Cho phép chúng ta định nghĩa database queries bằng nhiều cách:

  • Add Sources
  • Create filters
  • Define sorting

Aggregates dễ dàng để createmaintain

  • Excel-like hiển thì real data
  • SQL knowledge là KHÔNG bắt buộc

Tạo Aggregates
  • Trong action Preparation cuar Screen kéo một Aggregate từ Toolbox vào Action flow
  • Kéo Entitycần fetch data vào Action Flow tại Aggregate vừa tạo trước đó (accelerator)

Aggregates

🧨Sources

  • Aggregates hỗ trợ một hoặc nhiều source Entities
  • sources có kiều là Aggregate’s Output List (Customer List…)

✨Filters

Tương ứng với mệnh đề WHERE trong SQL

  • Có thể có một hoặc nhiều conditions cho câu query để filter các output records

🧶Sorting

Tương ứng với mệnh đề ORDER BY trong SQL

  • Định nghĩa Entity’s attribute để order by và (Ascending, Ascending)
  • Khi định nghĩa nhiều sorts thứ tự sẽ ưu tiên từ trên xuống dưới

🎪Testing

  • Cho phép chỉ định các giá trị external variables được sử dụng để filter or sort conditions
  • Có thể có nhiều giá trị external variables để xem preview phục vụ cho test, không ảnh hưởng đến real result

💨Output [Output paramater]

Các properties:

  • Length - Số lượng kết quả return
  • Empty - True if Không có hồ sơ nào được return
  • EOF, BOF, CurrentRowNumber - điền trong khi iterating List
    Aggregate Get chứa một “List.Current”
    EOF :: End of file, BOF: Begin of file
  • Type matches định nghĩa của câu query
  • “Current” là cursor di chuyển qua List khi iterating
  • Điền trong default values if returned Empty List

💦Properties

  • Max.Records: Giới hạn kết quả return, không ảnh hưởng đến Count output
  • Executed SQL: Hiển thị câu lệnh SQL sẽ được thực hiện, không sửa ở đây được

HẾT.

@Copyright 2022 by HieuEM Github