MCPcopy Index your code
hub / github.com/electric-sql/pglite / deleteShape

Function deleteShape

packages/pglite-sync/test-e2e/sync-e2e.test.ts:69–83  ·  view source on GitHub ↗
(table: string, handle: string)

Source from the content-addressed store, hash-verified

67}
68
69const deleteShape = async (table: string, handle: string) => {
70 const deleteUrl = new URL(ELECTRIC_URL)
71 deleteUrl.searchParams.set('table', table)
72 deleteUrl.searchParams.set('handle', handle)
73 const res = await fetch(deleteUrl, {
74 method: 'DELETE',
75 })
76 if (res.status === 404) {
77 // Nothing to delete
78 return
79 }
80 if (!res.ok) {
81 throw new Error(`Error deleting shape: ${res.statusText}`)
82 }
83}
84
85const deleteAllShapes = async () => {
86 for (const [handle, table] of shapeHandles.entries()) {

Callers 3

deleteAllShapesFunction · 0.85
deleteAllShapesForTableFunction · 0.85
sync-e2e.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected