chore: add spotless for sql files for postgres (#37016)
## Description Add spotless check for SQL files. ## Automation /ok-to-test tags="@tag.All" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/11549507562> > Commit: 5614181e15e5cfa768f43fb73d23b559ddaba782 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11549507562&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Mon, 28 Oct 2024 11:13:16 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Added user guidance in SQL templates to prompt users for valid table names. - **Bug Fixes** - Improved formatting of SQL statements for better readability across various plugins. - **Chores** - Updated configuration to include SQL files for formatting by the Spotless Maven plugin. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
f6787db0d2
commit
c2bf6c830e
|
|
@ -1,8 +1,8 @@
|
||||||
INSERT INTO users
|
INSERT INTO users
|
||||||
(name, gender, email)
|
(name, gender, email)
|
||||||
VALUES
|
VALUES
|
||||||
(
|
(
|
||||||
{{ nameInput.text }},
|
{{ nameInput.text }},
|
||||||
{{ genderDropdown.selectedOptionValue }},
|
{{ genderDropdown.selectedOptionValue }},
|
||||||
{{ emailInput.text }}
|
{{ emailInput.text }}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
SELECT TOP 10 * FROM <<your_table_name>>;
|
SELECT TOP 10 * FROM <<your_table_name>>;
|
||||||
|
|
||||||
-- Please enter a valid table name and hit RUN
|
-- Please enter a valid table name and hit RUN
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
UPDATE users
|
UPDATE users
|
||||||
SET status = 'APPROVED'
|
SET status = 'APPROVED'
|
||||||
WHERE id = {{ usersTable.selectedRow.id }};
|
WHERE id = {{ usersTable.selectedRow.id }};
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
INSERT INTO users
|
INSERT INTO users
|
||||||
(name, gender, email)
|
(name, gender, email)
|
||||||
VALUES
|
VALUES
|
||||||
(
|
(
|
||||||
{{ nameInput.text }},
|
{{ nameInput.text }},
|
||||||
{{ genderDropdown.selectedOptionValue }},
|
{{ genderDropdown.selectedOptionValue }},
|
||||||
{{ emailInput.text }}
|
{{ emailInput.text }}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
DELETE FROM users WHERE id = -1;
|
DELETE FROM users WHERE id = -1;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
UPDATE users
|
UPDATE users
|
||||||
SET status = 'APPROVED'
|
SET status = 'APPROVED'
|
||||||
WHERE id = {{ usersTable.selectedRow.id }};
|
WHERE id = {{ usersTable.selectedRow.id }};
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
DELETE FROM users WHERE id = {{idInput.text}}
|
DELETE FROM users WHERE id = {{idInput.text}}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
INSERT INTO users
|
INSERT INTO users
|
||||||
(name, gender, email)
|
(name, gender, email)
|
||||||
VALUES
|
VALUES
|
||||||
(
|
(
|
||||||
{{ nameInput.text }},
|
{{ nameInput.text }},
|
||||||
{{ genderDropdown.selectedOptionValue }},
|
{{ genderDropdown.selectedOptionValue }},
|
||||||
{{ emailInput.text }}
|
{{ emailInput.text }}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
UPDATE users SET status = 'APPROVED' WHERE id = {{ usersTable.selectedRow.id }}
|
UPDATE users SET status = 'APPROVED' WHERE id = {{ usersTable.selectedRow.id }}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
INSERT INTO users
|
INSERT INTO users
|
||||||
(name, gender, email)
|
(name, gender, email)
|
||||||
VALUES
|
VALUES
|
||||||
(
|
(
|
||||||
{{ nameInput.text }},
|
{{ nameInput.text }},
|
||||||
{{ genderDropdown.selectedOptionValue }},
|
{{ genderDropdown.selectedOptionValue }},
|
||||||
{{ emailInput.text }}
|
{{ emailInput.text }}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
DELETE FROM users WHERE id = -1;
|
DELETE FROM users WHERE id = -1;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
SELECT * FROM <<your_table_name>> LIMIT 10;
|
SELECT * FROM <<your_table_name>> LIMIT 10;
|
||||||
|
|
||||||
-- Please enter a valid table name and hit RUN
|
-- Please enter a valid table name and hit RUN
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
UPDATE users
|
UPDATE users
|
||||||
SET status = 'APPROVED'
|
SET status = 'APPROVED'
|
||||||
WHERE id = {{ usersTable.selectedRow.id }};
|
WHERE id = {{ usersTable.selectedRow.id }};
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
INSERT INTO users
|
INSERT INTO users
|
||||||
(name, gender, email)
|
(name, gender, email)
|
||||||
VALUES
|
VALUES
|
||||||
(
|
(
|
||||||
{{ nameInput.text }},
|
{{ nameInput.text }},
|
||||||
{{ genderDropdown.selectedOptionValue }},
|
{{ genderDropdown.selectedOptionValue }},
|
||||||
{{ emailInput.text }}
|
{{ emailInput.text }}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
DELETE FROM users WHERE id = -1;
|
DELETE FROM users WHERE id = -1;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
SELECT * FROM <<your_table_name>> LIMIT 10;
|
SELECT * FROM <<your_table_name>> LIMIT 10;
|
||||||
|
|
||||||
-- Please enter a valid table name and hit RUN
|
-- Please enter a valid table name and hit RUN
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
UPDATE users
|
UPDATE users
|
||||||
SET status = 'APPROVED'
|
SET status = 'APPROVED'
|
||||||
WHERE id = {{ usersTable.selectedRow.id }};
|
WHERE id = {{ usersTable.selectedRow.id }};
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
INSERT INTO users
|
INSERT INTO users
|
||||||
(name, gender, email)
|
(name, gender, email)
|
||||||
VALUES
|
VALUES
|
||||||
(
|
(
|
||||||
'{{ nameInput.text }}',
|
'{{ nameInput.text }}',
|
||||||
'{{ genderDropdown.selectedOptionValue }}',
|
'{{ genderDropdown.selectedOptionValue }}',
|
||||||
'{{ emailInput.text }}'
|
'{{ emailInput.text }}'
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
DELETE FROM users WHERE id = -1;
|
DELETE FROM users WHERE id = -1;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
SELECT * FROM <<your_table_name>> LIMIT 10;
|
SELECT * FROM <<your_table_name>> LIMIT 10;
|
||||||
|
|
||||||
-- Please enter a valid table name and hit RUN
|
-- Please enter a valid table name and hit RUN
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
UPDATE users
|
UPDATE users
|
||||||
SET status = 'APPROVED'
|
SET status = 'APPROVED'
|
||||||
WHERE id = '{{ usersTable.selectedRow.id }}';
|
WHERE id = '{{ usersTable.selectedRow.id }}';
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@
|
||||||
<includes>
|
<includes>
|
||||||
<include>*.md</include>
|
<include>*.md</include>
|
||||||
<include>.gitignore</include>
|
<include>.gitignore</include>
|
||||||
|
<include>**/*.sql</include>
|
||||||
</includes>
|
</includes>
|
||||||
<!-- define the steps to apply to those files -->
|
<!-- define the steps to apply to those files -->
|
||||||
<trimTrailingWhitespace/>
|
<trimTrailingWhitespace/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user