Skip to content

Commit b181f66

Browse files
fix: sqlc-fluff pre-commit fix
1 parent 7bfa462 commit b181f66

3 files changed

Lines changed: 18 additions & 12 deletions

File tree

.sqlfluff

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
[sqlfluff]
2-
exclude_rules = LT14,LT01,LT02,LT05,LT09,AM04,AL03,RF02,RF04,AM05,AL01,ST06,CV04,CP01,CP03
2+
exclude_rules = AM04,AL03,RF02,RF04,AM05,AL01,ST06
33
dialect = ansi
44

55
[sqlfluff:rules]
66

7+
[sqlfluff:rules:LT02]
8+
capitalisation_policy = upper
9+
710
[sqlfluff:paths:examples/config/postgresql/]
811
dialect = postgres
912

examples/config/mysql/query.sql

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
SELECT * FROM authors WHERE name = ? LIMIT 1;
33

44
-- name: ListAuthors :many
5-
SELECT * FROM authors ORDER BY name;
5+
SELECT * FROM authors
6+
ORDER BY name;
67

78
-- name: CreateAuthor :exec
89
INSERT INTO authors (id, name, bio) VALUES (?, ?, ?);
@@ -14,10 +15,12 @@ INSERT INTO authors (name, bio) VALUES (?, ?);
1415
SELECT * FROM authors WHERE id = ? LIMIT 1;
1516

1617
-- name: GetAuthorByNamePattern :many
17-
SELECT * FROM authors WHERE name LIKE COALESCE(sqlc.narg('name_pattern'), '%');
18+
SELECT * FROM authors
19+
WHERE name LIKE COALESCE(sqlc.narg('name_pattern'), '%');
1820

1921
-- name: DeleteAuthor :exec
20-
DELETE FROM authors WHERE name = ?;
22+
DELETE FROM authors
23+
WHERE name = ?;
2124

2225
-- name: DeleteAllAuthors :exec
2326
DELETE FROM authors;

examples/config/mysql/schema.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
CREATE TABLE authors (
2-
id BIGINT PRIMARY KEY AUTO_INCREMENT,
3-
name TEXT NOT NULL,
4-
bio TEXT
2+
id BIGINT PRIMARY KEY AUTO_INCREMENT,
3+
name TEXT NOT NULL,
4+
bio TEXT
55
);
66

77
CREATE TABLE books (
8-
id BIGINT PRIMARY KEY AUTO_INCREMENT,
9-
name TEXT NOT NULL,
10-
author_id BIGINT NOT NULL,
11-
description TEXT,
12-
FOREIGN KEY (author_id) REFERENCES authors (id) ON DELETE CASCADE
8+
id BIGINT PRIMARY KEY AUTO_INCREMENT,
9+
name TEXT NOT NULL,
10+
author_id BIGINT NOT NULL,
11+
description TEXT,
12+
FOREIGN KEY (author_id) REFERENCES authors (id) ON DELETE CASCADE
1313
);
1414

1515
CREATE TABLE mysql_types (

0 commit comments

Comments
 (0)