supabase_schema_core 1.4.1
supabase_schema_core: ^1.4.1 copied to clipboard
Internal package for Supabase schema fetching and type mapping. Used by supafreeze and suparepo. Not intended for direct use.
Changelog #
1.4.1 - 2026-03-11 #
Fixed #
mergeEnumTypesでOpenAPI由来のenum名(tableName_columnName形式)がpg_enum名にマッチせずdynamicになるバグを修正openApiEnumsパラメータを追加し、TypeMapperクリア前のOpenAPI enum情報を参照可能に
1.4.0 - 2026-03-11 #
Added #
EnumInfoclass for representing PostgreSQL enum types (name + values)SchemaFetcher.fetchEnums()— queriespg_enum+pg_type+pg_namespacecatalog to fetch PostgreSQL enum definitions; falls back to OpenAPI-detected enums whenexecute_sqlis not availableSchemaFetcher.mergeEnumTypes()static method — replaces OpenAPI-derived enum type names (tableName_columnName) with actual PostgreSQL type names in table column definitionsTypeMapper.useEnumTypesstatic flag — whentrue,mapType()returns PascalCase Dart enum type names instead ofStringfor registered enum typesTypeMapper.enumTypeName()— converts PostgreSQL enum type name to Dart enum type name (e.g.campaign_type→CampaignType)
1.3.0 - 2026-03-03 #
Added #
RpcTableColumnclass for representing columns inRETURNS TABLE(...)definitionsRpcFunctionInfo.tableColumnsfield — non-null when the function usesRETURNS TABLE(col1 type1, ...)SchemaFetcher._fetchRpcTableColumns()— queriespg_proccatalog (proargmodes,proargnames,proallargtypes) to extract TABLE column names and typesSchemaFetcher.mergeTableColumns()static method to merge TABLE column info intoRpcFunctionInfolistfetchRpcFunctions()now callsmergeTableColumnsaftermergeReturnTypesto populatetableColumnsfor RETURNS TABLE functions
1.2.2 - 2026-03-03 #
Fixed #
mergeReturnTypes()now correctly handlesRETURNS TABLE(...)functions — previously treated asvoidbecausepg_procreports them asrecordtype, now detected assetof jsonbwhenproretset = true
1.2.1 - 2026-02-23 #
Fixed #
_fetchRpcReturnTypes()now wraps thepg_procquery withjson_aggso thatexecute_sql(which usesEXECUTE ... INTO) returns all rows as a single JSON array instead of only the first row
1.2.0 - 2026-02-23 #
Added #
RpcFunctionInfo.copyWith()method for updating return type fieldsSchemaFetcher.mergeReturnTypes()static method to correctvoidreturn types usingpg_proccatalogSchemaFetcher._fetchRpcReturnTypes()to querypg_procfor accurate return type information
Changed #
fetchRpcFunctions()now queriespg_proccatalog to correct scalar return types (e.g.bool,int4) that PostgREST OpenAPI spec reports as empty schema (void)- Only active when
execute_sqlRPC function is available - Falls back to OpenAPI-only behavior when
execute_sqlis not configured
- Only active when
1.1.0 - 2026-02-11 #
Added #
RpcParamInfoclass for representing RPC function parametersRpcFunctionInfoclass for representing RPC function metadataSchemaFetcher.fetchRpcFunctions()to fetch RPC function definitions from OpenAPI specSchemaFetcher.parseRpcFunctions()to parse RPC functions from OpenAPI JSON
Changed #
- Extracted
_fetchOpenApiSpec()as a shared method for both table and RPC fetching