Ensure live queries occur before event queries

This commit is contained in:
Tobie Morgan Hitchcock 2020-02-17 13:36:27 +00:00
parent dc48c16f1f
commit 180ab61207
6 changed files with 12 additions and 12 deletions

View file

@ -157,11 +157,11 @@ func (d *document) runCreate(ctx context.Context, stm *sql.CreateStatement) (int
return nil, err
}
if err = d.event(ctx, met); err != nil {
if err = d.lives(ctx, met); err != nil {
return nil, err
}
if err = d.lives(ctx, met); err != nil {
if err = d.event(ctx, met); err != nil {
return nil, err
}

View file

@ -162,11 +162,11 @@ func (d *document) runDelete(ctx context.Context, stm *sql.DeleteStatement) (int
return nil, err
}
if err = d.event(ctx, met); err != nil {
if err = d.lives(ctx, met); err != nil {
return nil, err
}
if err = d.lives(ctx, met); err != nil {
if err = d.event(ctx, met); err != nil {
return nil, err
}

View file

@ -125,11 +125,11 @@ func (d *document) runInsert(ctx context.Context, stm *sql.InsertStatement) (int
return nil, err
}
if err = d.event(ctx, met); err != nil {
if err = d.lives(ctx, met); err != nil {
return nil, err
}
if err = d.lives(ctx, met); err != nil {
if err = d.event(ctx, met); err != nil {
return nil, err
}

View file

@ -155,11 +155,11 @@ func (d *document) runRelate(ctx context.Context, stm *sql.RelateStatement) (int
return nil, err
}
if err = d.event(ctx, met); err != nil {
if err = d.lives(ctx, met); err != nil {
return nil, err
}
if err = d.lives(ctx, met); err != nil {
if err = d.event(ctx, met); err != nil {
return nil, err
}

View file

@ -168,11 +168,11 @@ func (d *document) runUpdate(ctx context.Context, stm *sql.UpdateStatement) (int
return nil, err
}
if err = d.event(ctx, met); err != nil {
if err = d.lives(ctx, met); err != nil {
return nil, err
}
if err = d.lives(ctx, met); err != nil {
if err = d.event(ctx, met); err != nil {
return nil, err
}

View file

@ -131,11 +131,11 @@ func (d *document) runUpsert(ctx context.Context, stm *sql.UpsertStatement) (int
return nil, err
}
if err = d.event(ctx, met); err != nil {
if err = d.lives(ctx, met); err != nil {
return nil, err
}
if err = d.lives(ctx, met); err != nil {
if err = d.event(ctx, met); err != nil {
return nil, err
}