XL5TCKC2R4UWXQUTKWQOZQVVIPOHBEN5NYRUCV32V56PEQHDR46AC
// Create cluster with optional recording pattern in transaction
const result = await db.transaction(async (tx) => {
const now = new Date();
let cyclicRecordingPatternId = null;
// Create cluster with optional recording pattern (no transaction support in neon-http driver)
const now = new Date();
let cyclicRecordingPatternId = null;
let result;
});
} catch (error) {
// If cluster creation failed and we created a recording pattern, we should clean it up
// However, without transactions, this creates a potential orphaned record
// In practice, orphaned recording patterns can be cleaned up separately
console.error("Error creating cluster:", error);
throw error;
}
// Update cluster with optional recording pattern changes in transaction
const result = await db.transaction(async (tx) => {
const currentPatternId = clusterRecord.cyclicRecordingPatternId;
// Update cluster with optional recording pattern changes (no transaction support in neon-http driver)
const currentPatternId = clusterRecord.cyclicRecordingPatternId;
let result;