hook up seaweed sql engine

This commit is contained in:
chrislu
2025-09-02 08:42:36 -07:00
parent 5a8c31fcda
commit 8b4914be55
4 changed files with 100 additions and 379 deletions

View File

@@ -101,7 +101,6 @@ type PostgreSQLServer struct {
sessionMux sync.RWMutex
shutdown chan struct{}
wg sync.WaitGroup
translator *PostgreSQLTranslator
nextConnID uint32
}
@@ -169,21 +168,14 @@ func NewPostgreSQLServer(config *PostgreSQLServerConfig, masterAddr string) (*Po
config.IdleTimeout = time.Hour
}
// Create SQL engine
// Create SQL engine with real MQ connectivity
sqlEngine := engine.NewSQLEngine(masterAddr)
// Initialize translator
translator := &PostgreSQLTranslator{
systemQueries: make(map[string]string),
}
translator.initSystemQueries()
server := &PostgreSQLServer{
config: config,
sqlEngine: sqlEngine,
sessions: make(map[uint32]*PostgreSQLSession),
shutdown: make(chan struct{}),
translator: translator,
nextConnID: 1,
}