• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

teableio / teable / 8538004962

03 Apr 2024 11:36AM UTC coverage: 18.233% (-3.3%) from 21.535%
8538004962

Pull #528

github

web-flow
Merge c1a248a6f into 45ee7ebb3
Pull Request #528: feat: Kanban view

575 of 1136 branches covered (50.62%)

29 of 2908 new or added lines in 83 files covered. (1.0%)

5 existing lines in 5 files now uncovered.

6439 of 35315 relevant lines covered (18.23%)

3.94 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/packages/openapi/src/aggregation/get-row-count.ts
1
import type { RouteConfig } from '@asteasolutions/zod-to-openapi';
×
2
import { axios } from '../axios';
×
3
import type { IQueryBaseRo } from '../record';
×
4
import { queryBaseSchema } from '../record';
×
5
import { registerRoute, urlBuilder } from '../utils';
×
6
import { z } from '../zod';
×
7
import { baseRawAggregationValueSchema } from './get-aggregation';
×
8

×
9
export const rawRowCountValueSchema = baseRawAggregationValueSchema.pick({
×
10
  rowCount: true,
×
11
});
×
12

×
13
export type IRawRowCountValue = z.infer<typeof rawRowCountValueSchema>;
×
14

×
15
export const rowCountVoSchema = rawRowCountValueSchema;
×
16

×
17
export type IRowCountVo = z.infer<typeof rowCountVoSchema>;
×
18

×
19
export const GET_ROW_COUNT = '/table/{tableId}/aggregation/row-count';
×
20

×
21
export const GetRowCountRoute: RouteConfig = registerRoute({
×
22
  method: 'get',
×
23
  path: GET_ROW_COUNT,
×
24
  description: 'Get row count for the view',
×
25
  request: {
×
26
    params: z.object({
×
27
      tableId: z.string(),
×
28
    }),
×
29
    query: queryBaseSchema,
×
30
  },
×
31
  responses: {
×
32
    200: {
×
33
      description: 'Row count for the view',
×
34
      content: {
×
35
        'application/json': {
×
36
          schema: rowCountVoSchema,
×
37
        },
×
38
      },
×
39
    },
×
40
  },
×
41
  tags: ['aggregation'],
×
42
});
×
43

×
44
export const getRowCount = async (tableId: string, query?: IQueryBaseRo) => {
×
NEW
45
  return axios.get<IRowCountVo>(urlBuilder(GET_ROW_COUNT, { tableId }), {
×
NEW
46
    params: {
×
NEW
47
      ...query,
×
NEW
48
      filter: JSON.stringify(query?.filter),
×
NEW
49
    },
×
NEW
50
  });
×
UNCOV
51
};
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc