8000 chore: format code · joeally/postgres-meta@f12023d · GitHub
[go: up one dir, main page]

Skip to content

Commit f12023d

Browse files
committed
chore: format code
1 parent dee8a93 commit f12023d

File tree

8 files changed

+48
-25
lines changed

8 files changed

+48
-25
lines changed

src/server/routes/functions.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ export default async (fastify: FastifyInstance) => {
2323
const offset = request.query.offset
2424

2525
const pgMeta = new PostgresMeta({ ...DEFAULT_POOL_CONFIG, connectionString })
26-
const { data, error } = await pgMeta.functions.list({ includeSystemSchemas, includedSchemas, excludedSchemas, limit, offset })
26+
const { data, error } = await pgMeta.functions.list({
27+
includeSystemSchemas,
28+
includedSchemas,
29+
excludedSchemas,
30+
limit,
31+
offset,
32+
})
2733
await pgMeta.end()
2834
if (error) {
2935
request.log.error({ error, request: extractRequestForLogging(request) })

src/server/routes/policies.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ export default async (fastify: FastifyInstance) => {
2323
const offset = request.query.offset
2424

2525
const pgMeta = new PostgresMeta({ ...DEFAULT_POOL_CONFIG, connectionString })
26-
const { data, error } = await pgMeta.policies.list({ includeSystemSchemas, includedSchemas, excludedSchemas, limit, offset })
26+
const { data, error } = await pgMeta.policies.list({
27+
includeSystemSchemas,
28+
includedSchemas,
29+
excludedSchemas,
30+
limit,
31+
offset,
32+
})
2733
await pgMeta.end()
2834
if (error) {
2935
request.log.error({ error, request: extractRequestForLogging(request) })

src/server/routes/tables.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ export default async (fastify: FastifyInstance) => {
2323
const offset = request.query.offset
2424

2525
const pgMeta = new PostgresMeta({ ...DEFAULT_POOL_CONFIG, connectionString })
26-
const { data, error } = await pgMeta.tables.list({ includeSystemSchemas, includedSchemas, excludedSchemas, limit, offset })
26+
const { data, error } = await pgMeta.tables.list({
27+
includeSystemSchemas,
28+
includedSchemas,
29+
excludedSchemas,
30+
limit,
31+
offset,
32+
})
2733
await pgMeta.end()
2834
if (error) {
2935
request.log.error({ error, request: extractRequestForLogging(request) })

src/server/routes/types.ts

Lines changed: 7 additions & 1 deletion
57AE
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ export default async (fastify: FastifyInstance) => {
2323
const offset = request.query.offset
2424

2525
const pgMeta = new PostgresMeta({ ...DEFAULT_POOL_CONFIG, connectionString })
26-
const { data, error } = await pgMeta.types.list({ includeSystemSchemas, includedSchemas, excludedSchemas, limit, offset })
26+
const { data, error } = await pgMeta.types.list({
27+
includeSystemSchemas,
28+
includedSchemas,
29+
excludedSchemas,
30+
limit,
31+
offset,
32+
})
2733
await pgMeta.end()
2834
if (error) {
2935
request.log.error({ error, request: extractRequestForLogging(request) })

test/lib/columns.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,25 +101,25 @@ test('list from a single table', async () => {
101101

102102
test('list columns with included schemas', async () => {
103103
let res = await pgMeta.columns.list({
104-
includedSchemas: ['public']
104+
includedSchemas: ['public'],
105105
})
106106

107107
expect(res.data?.length).toBeGreaterThan(0)
108108

109109
res.data?.forEach((column) => {
110110
expect(column.schema).toBe('public')
111111
})
112-
})
112+
})
113113

114114
test('list columns with excluded schemas', async () => {
115115
let res = await pgMeta.columns.list({
116116
excludedSchemas: ['public'],
117117
})
118-
118+
119119
res.data?.forEach((column) => {
120120
expect(column.schema).not.toBe('public')
121121
})
122-
})
122+
})
123123

124124
test('list columns with excluded schemas and include System Schemas', async () => {
125125
let res = await pgMeta.columns.list({
@@ -132,7 +132,7 @@ test('list columns with excluded schemas and include System Schemas', async () =
132132
res.data?.forEach((column) => {
133133
expect(column.schema).not.toBe('public')
134134
})
135-
})
135+
})
136136

137137
test('retrieve, create, update, delete', async () => {
138138
const { data: testTable }: any = await pgMeta.tables.create({ name: 't' })

test/lib/functions.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,25 @@ test('list', async () => {
4242

4343
test('list functions with included schemas', async () => {
4444
let res = await pgMeta.functions.list({
45-
includedSchemas: ['public']
45+
includedSchemas: ['public'],
4646
})
4747

4848
expect(res.data?.length).toBeGreaterThan(0)
4949

5050
res.data?.forEach((func) => {
5151
expect(func.schema).toBe('public')
5252
})
53-
})
53+
})
5454

5555
test('list functions with excluded schemas', async () => {
5656
let res = await pgMeta.functions.list({
5757
excludedSchemas: ['public'],
5858
})
59-
59+
6060
res.data?.forEach((func) => {
6161
expect(func.schema).not.toBe('public')
6262
})
63-
})
63+
})
6464

6565
test('list functions with excluded schemas and include System Schemas', async () => {
6666
let res = await pgMeta.functions.list({
@@ -73,7 +73,7 @@ test('list functions with excluded schemas and include System Schemas', async ()
7373
res.data?.forEach((func) => {
7474
expect(func.schema).not.toBe('public')
7575
})
76-
})
76+
})
7777

7878
test('retrieve, create, update, delete', async () => {
7979
const {

test/lib/tables.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,25 +131,25 @@ test('list', async () => {
131131

132132
test('list tables with included schemas', async () => {
133133
let res = await pgMeta.tables.list({
134-
includedSchemas: ['public']
134+
includedSchemas: ['public'],
135135
})
136136

137137
expect(res.data?.length).toBeGreaterThan(0)
138138

139139
res.data?.forEach((table) => {
140140
expect(table.schema).toBe('public')
141141
})
142-
})
142+
})
143143

144144
test('list tables with excluded schemas', async () => {
145145
let res = await pgMeta.tables.list({
146146
excludedSchemas: ['public'],
147147
})
148-
148+
149149
res.data?.forEach((table) => {
150150
expect(table.schema).not.toBe('public')
151151
})
152-
})
152+
})
153153

154154
test('list tables with excluded schemas and include System Schemas', async () => {
155155
let res = await pgMeta.tables.list({
162162
res.data?.forEach((table) => {
163163
expect(table.schema).not.toBe('public')
164164
})
165-
})
165+
})
166166

167167
test('retrieve, create, update, delete', async () => {
168168
let res = await pgMeta.tables.create({ name: 'test', comment: 'foo' })

test/lib/types.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,27 @@ test('list', async () => {
2020
)
2121
})
2222

23-
2423
test('list types with included schemas', async () => {
2524
let res = await pgMeta.types.list({
26-
includedSchemas: ['public']
25+
includedSchemas: ['public'],
2726
})
2827

2928
expect(res.data?.length).toBeGreaterThan(0)
3029

3130
res.data?.forEach((type) => {
3231
expect(type.schema).toBe('public')
3332
})
34-
})
33+
})
3534

3635
test('list types with excluded schemas', async () => {
3736
let res = await pgMeta.types.list({
3837
excludedSchemas: ['public'],
3938
})
40-
39+
4140
res.data?.forEach((type) => {
4241
expect(type.schema).not.toBe('public')
4342
})
44-
})
43+
})
4544

4645
test('list types with excluded schemas and include System Schemas', async () => {
4746
let res = await pgMeta.types.list({
@@ -54,4 +53,4 @@ test('list types with excluded schemas and include System Schemas', async () =>
5453
res.data?.forEach((type) => {
5554
expect(type.schema).not.toBe('public')
5655
})
57-
})
56+
})

0 commit comments

Comments
 (0)
0