test: cfquery с inline datasource

This commit is contained in:
2026-06-18 12:45:28 +04:00
parent 91e1cdf76b
commit d1e602881b
+16
View File
@@ -0,0 +1,16 @@
<cfprocessingdirective suppressWhitespace="true">
<cfheader name="Content-Type" value="text/plain; charset=utf-8">
<cfset con = {
class: "org.postgresql.Driver",
connectionString: "jdbc:postgresql://postgresqlk8s-master.418f9960-2eb7-4429-b2ec-ac64319d7268.svc.cluster.local:5432/baza",
username: "super",
password: "hoHdkA23yxlD9oMUlZ1bIbNyc6DE2mNJmyHMNkEpVD1F4suQs7O2lyN4t0qITyzt"
}>
<cftry>
<cfquery name="q" datasource="#con#">SELECT 1 as ok</cfquery>
OK: #q.ok#
<cfcatch>ERROR: #cfcatch.message# #cfcatch.detail#</cfcatch>
</cftry>
</cfprocessingdirective>