@@ -15,6 +15,8 @@ export default async (fastify: FastifyInstance) => {
1515 Headers : { pg : string }
1616 Querystring : {
1717 include_system_schemas ?: string
18+ limit ?: number
19+ offset ?: number
1820 }
1921 } > (
2022 '/' ,
@@ -25,6 +27,8 @@ export default async (fastify: FastifyInstance) => {
2527 } ) ,
2628 querystring : Type . Object ( {
2729 include_system_schemas : Type . Optional ( Type . String ( ) ) ,
30+ limit : Type . Optional ( Type . String ( ) ) ,
31+ offset : Type . Optional ( Type . String ( ) ) ,
2832 } ) ,
2933 response : {
3034 200 : Type . Array ( postgresSchemaSchema ) ,
@@ -37,9 +41,11 @@ export default async (fastify: FastifyInstance) => {
3741 async ( request , reply ) => {
3842 const connectionString = request . headers . pg
3943 const includeSystemSchemas = request . query . include_system_schemas === 'true'
44+ const limit = request . query . limit
45+ const offset = request . query . offset
4046
4147 const pgMeta = new PostgresMeta ( { ...DEFAULT_POOL_CONFIG , connectionString } )
42- const { data, error } = await pgMeta . schemas . list ( { includeSystemSchemas } )
48+ const { data, error } = await pgMeta . schemas . list ( { includeSystemSchemas, limit , offset } )
4349 await pgMeta . end ( )
4450 if ( error ) {
4551 request . log . error ( JSON . stringify ( { error, req : request . body } ) )
0 commit comments