Databases Reference
In-Depth Information
from apex activity log
group by to char(timestamp,'YYYY.MM.DD.HH24')
order by 6 desc
Running SQL and PL/SQL Contained Within an Application
APEX reports, conditions, charts, processes, and a variety of other components, described in depth
within this topic, allow for the use of SQL and or PL/SQL. As described earlier, the APEX engine is the
“executive” which is responsible for rending pages. The APEX engine reads the metadata required to
service requests using the PL/SQL packages that comprise APEX. Internal metadata queries are
constrained by the workspace ID, and frequently also application ID, page ID, region ID, etc.
If you take the example of a SQL report region, the APEX engine will query the report SQL text from
the APEX metadata. It will then parse the SQL as the parsing schema of the application. Each application
defines a parsing schema which is checked to ensure that the corresponding workspace has the privilege
to parse as this schema. Workspaces can have one or more assigned schemas, so the application's
parsing schema defines how the SQL within the application is to be parsed. Before executing any SQL,
the APEX engine will locate bind variables and bind in corresponding session state. If no session state is
set for a given bind variable, a null will be bound. If the bind variable referenced does not exist in the
application, a null will also be bound. Listing 12-5 illustrated a SQL query with a bind variable.
PL/SQL can also exist in many contexts within APEX. The most popular uses of PL/SQL within APEX
applications include
Snippets or fragments used for validations and component conditionality
Page and application-level processes
Regions of type PL/SQL
Workspaces and Multi-Tenancy
Applications are developed and deployed within a workspace. Figure 12-8 shows the Oracle Application
Express login page. Application developers log in to a workspace and provide a username and password
specific to that workspace.
Figure 12-8. Oracle Application Express login page
Search WWH ::




Custom Search