Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

var scope errors on Adobe ColdFusion in examples for querysome & structsome #1685

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/en/querysome.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
{
"title":" The simple Querysome example",
"description":"Here,we've example to check whether the 75 is exists or not in myquery mark column value.",
"code":"<cfscript>\r\n var myQuery = queryNew(\"id,name,mark\",\"integer,varchar,integer\",[[1,\"Rahu\",75],[2,\"Ravi\",80]]);\r\n result = querySome(myQuery , function(details){\r\n\t return details.mark IS 75;\r\n });\r\n writeOutput((result ? \"Some\" : \"No\") & \" matches Record found!\");\r\n</cfscript>",
"code":"<cfscript>\r\nmyQuery = queryNew(\"id,name,mark\",\"integer,varchar,integer\",[[1,\"Rahu\",75],[2,\"Ravi\",80]]);\r\n result = querySome(myQuery , function(details){\r\n\t return details.mark IS 75;\r\n });\r\n writeOutput((result ? \"Some\" : \"No\") & \" matches Record found!\");\r\n</cfscript>",
"result":"Some matches Record found!"
},
{
"title":"The Query Member Function example",
"description":"Here,we've example to check whether the 85 is exists or not in myquery mark column value using query member function.",
"code":"<cfscript>\r\n var myQuery = queryNew(\"id,name,mark\",\"integer,varchar,integer\",[[1,\"Rahu\",75],[2,\"Ravi\",80]]);\r\n result = myQuery.Some(function(details){\r\n\t return details.mark IS 85;\r\n });\r\n writeOutput((result ? \"Some\" : \"No\") & \" matches Record found!\");\r\n</cfscript>",
"code":"<cfscript>\r\nmyQuery = queryNew(\"id,name,mark\",\"integer,varchar,integer\",[[1,\"Rahu\",75],[2,\"Ravi\",80]]);\r\n result = myQuery.Some(function(details){\r\n\t return details.mark IS 85;\r\n });\r\n writeOutput((result ? \"Some\" : \"No\") & \" matches Record found!\");\r\n</cfscript>",
"result":"No matches Record found!"
}
],
Expand Down
4 changes: 2 additions & 2 deletions data/en/structsome.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
{
"title":"The simple StructSome example",
"description":"Here we have simple example about structsome function.",
"code":"<cfscript>\r\nvar struct={\"Name\":\"Raja\",\"age\":20,\"mark\":80};\r\nresult = structSome(struct,function(key,value){\r\n\treturn key IS \"Name\"\r\n});\r\nwriteOutput((result ? '' : 'No')& \" Key Exists.\")\r\n</cfscript>",
"code":"<cfscript>\r\nstruct={\"Name\":\"Raja\",\"age\":20,\"mark\":80};\r\nresult = structSome(struct,function(key,value){\r\n\treturn key IS \"Name\"\r\n});\r\nwriteOutput((result ? '' : 'No')& \" Key Exists.\")\r\n</cfscript>",
"result":"Key Exists."
},
{
"title":"The structSome member function example",
"description":"Here we have simple example about structsome as member function.",
"code":"<cfscript>\r\nvar struct={\"Name\":\"Raja\",\"age\":20,\"mark\":80};\r\nresult = struct.some(function(key,value){\r\n\treturn key IS \"average\"\r\n});\r\nwriteOutput((result ? '' : 'No')&\" Key Exists.\")\r\n</cfscript>",
"code":"<cfscript>\r\nstruct={\"Name\":\"Raja\",\"age\":20,\"mark\":80};\r\nresult = struct.some(function(key,value){\r\n\treturn key IS \"average\"\r\n});\r\nwriteOutput((result ? '' : 'No')&\" Key Exists.\")\r\n</cfscript>",
"result":"No Key Exists."
}
],
Expand Down
Loading