Skip to content

Commit a501ab5

Browse files
authored
Merge pull request foundeo#1387 from savaticus/patch-6
Add member syntax
2 parents 0cce415 + a0ac7c5 commit a501ab5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

data/en/queryaddcolumn.json

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name":"queryAddColumn",
33
"type":"function",
44
"syntax":"queryAddColumn(query, column_name [, datatype], array_name)",
5+
"member":"someQuery.addColumn(column_name [, datatype], array_name)",
56
"returns":"numeric",
67
"related":["QueryNew", "QueryAddRow", "QuerySetCell"],
78
"description":" Adds a column to a query and populates its rows with the\n contents of a one-dimensional array. Pads query columns,\n if necessary, to ensure that all columns have the same number\n of rows.",
@@ -33,6 +34,13 @@
3334
"code":"<!--- Make a query. ---> \r\n <cfset myQuery = queryNew(\"\")> \r\n <!--- Create an array. ---> \r\n <cfset FastFoodArray = arrayNew(1)> \r\n <cfset FastFoodArray[1] = \"French Fries\"> \r\n <cfset FastFoodArray[2] = \"Hot Dogs\"> \r\n <cfset FastFoodArray[3] = \"Fried Clams\"> \r\n <cfset FastFoodArray[4] = \"Thick Shakes\"> \r\n <!--- Use the array to add a column to the query. ---> \r\n <cfset nColumnNumber = queryAddColumn(myQuery, \"FastFood\", \"VarChar\", FastFoodArray)> \r\n <cfdump var=\"#myQuery#\" /> ",
3435
"result":"",
3536
"runnable":true
37+
},
38+
{
39+
"title":"member syntax example".
40+
"description":"add a column to a query using member syntax",
41+
"code":"books = queryNew(\"id,title\", \"integer,varchar\");\nbooks.addRow(\"author\", \"varchar\");\nwriteDump(books);",
42+
"result":"",
43+
"runnable":true
3644
}
3745
]
3846

0 commit comments

Comments
 (0)