Formatting options for QBSelect
Posted: Wed Apr 10, 2024 10:47 am
In developer we can format our code using the Source -> Format menu (or a keycode combination). The way the code is formatted can be controlled using various options in the Developer settings in the Javascript -> Formatter section. I have set these so that when I format my code I get pretty much the layout I want but I cannot seem to control the way that a QBSelect is formatted.
I have the following code before the format:
I would very much like it to stay that way as I feel it makes the code more readable but when I format the code I end up with the whole statement on one line.
Are there any settings I can change that will allow the statement chaining to remain on separate lines?
TIA
Steve
I have the following code before the format:
- Code: Select all
qMedias.where
.add(qMedias.columns.tenant_name.eq(recTenant.tenant_name))
.add(qMedias.columns.path.eq(path))
.add(qMedias.columns.name.eq(docName))
.add(qMedias.or
.add(qMedias.columns.sha256.eq(sha256))
.add(qMedias.columns.sha256.isNull));
I would very much like it to stay that way as I feel it makes the code more readable but when I format the code I end up with the whole statement on one line.
- Code: Select all
qMedias.where.add(qMedias.columns.tenant_name.eq(recTenant.tenant_name)).add(qMedias.columns.path.eq(path)).add(qMedias.columns.name.eq(docName)).add(qMedias.or.add(qMedias.columns.sha256.eq(sha256)).add(qMedias.columns.sha256.isNull));
Are there any settings I can change that will allow the statement chaining to remain on separate lines?
TIA
Steve