Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 453

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Accessing and Using Data
If you want to convert the date to its original format, use the
Understanding Query of Queries performance
Query of Queries performs well on single-table query objects that were accessed directly from a database. This happens
because ColdFusion stores meta information for a query object accessed from a database.
When working with a query resulting in a SQL join, Query of Queries performs as follows:
Query of Queries is efficient for simple joins in which only one equality exists between two column references or
1
constants, for example:
SELECT T1.a, b, c, d FROM T1, T2 WHERE T1.a = T2.a
2
Query of Queries is less efficient for joins in which the predicate contains multiple expressions, for example:
SELECT T1.a, b, c, d FROM T1, T2
WHERE T1.a = T2.a AND T1.b + T1.c = T2.b + T2.c
Understanding Query of Queries processing
Query of Queries can process the following:
• Column comparisons
• Queries passed by reference
• Complex objects
Comparing columns with different data types
Starting with ColdFusion MX 7, ColdFusion includes enhancements that allow you to compare columns with different
data types.
If one of the operands has a known column type (only constants have an unknown column type), Query of Queries
tries to coerce the constant with an unknown type to the type of the operand with metadata. The pairs of allowed
coercions are as follows:
• Binary, string
• Dates, string
• Numeric, bigdecimal
• Boolean, numeric
That is, ColdFusion can coerce between binary and string, but not between date and string.
If both operands have known data types, the types must be the same. The only exception is that ColdFusion can coerce
among integer, float, and double.
If both operands are constants, ColdFusion tries to coerce the values, first to the most restrictive type, then to the least
restrictive type.
• First to binary then to string.
• First to date then to string.
• First to boolean then to numeric.
DateFormat
Last updated 1/20/2012
function and apply the "mm/dd/yy" mask.
448

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents