DataSource Script in Lucee Admin

Using Lucee 6.1.0.243

After configuring a PostgreSQL Datasource - the admin has the following code - that you’re supposed to be able to use in Application.cfc to configure a datasource programatically.

However the text provided is not correct.

this.datasources["myDSN"] = {
	class: "org.postgresql.Driver", 
	bundleName: "org.postgresql.jdbc", 
	bundleVersion: "42.7.3",
	connectionString: "jdbc:postgresql://127.0.0.1:5432/myDSN",
	username: "postgres",
	password: "encrypted:f9b7f69697ad4cf96e40ea8571efa9f32771def52e7c69049fd77b3948f62a38",
	
	// optional settings
	blob:true, // default: false
	clob:true, // default: false
	connectionLimit:-1, // default:-1
	liveTimeout:10, // default: -1; unit: minutes
	timezone:'GMT'
	storage:true, // default: false
	validate:true, // default: false
};
  • The timezone attribute DOES NOT have a comma after it - despite it not being the last atttribute
  • the validate attribute DOES have a comma after it - and it is the last attribute.

It works the same, right? :sunglasses:

Should I log a bug?

No, you don’t need to create a bug report… I just created a PR to fix the issue:

I’m sure @Zackster or Micha will merge it as soon as they have some time.

1 Like

Thanks Andreas.

thanks @andreas, i have merged it into 6.2, i will also back port to 6.1.

@Gavin_Baumanis never hold back creating tickets, of course if they have a PR linked even better :wink:

2 Likes

@micstriit
I only asked because Jira states to only a log a bug after it had been discussed in the forum and you have been asked to create one.

Nonetheless;
I will create an issue / bug report from now on.

1 Like

Does that apply to everyone?

Because I’m wondering if the Jira statement that @Gavin_Baumanis mentioned should be updated?