Skip to content

Commit ff3ff0e

Browse files
fixed bun client after isDirty migration and removed method from model
1 parent 56fb5ca commit ff3ff0e

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

client/client.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@ type Account struct {
117117
// ...
118118
}
119119

120-
func (a Account) IsDirty() bool {
121-
// TODO implement
122-
return false
123-
}
124-
125120
// DeployProgress reports incremental progress for a deployment operation.
126121
type DeployProgress struct {
127122
Percent float32

client/client_bun.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,17 @@ func (c *BunClient) DeleteAccounts(ctx context.Context, ids ...ID) error {
371371
return nil
372372
}
373373

374+
func (c *BunClient) IsAccountDirty(ctx context.Context, a Account) (bool, error) {
375+
if c.store == nil {
376+
return false, errors.New("no store available")
377+
}
378+
account, err := c.store.GetAccount(int(a.Id))
379+
if err != nil {
380+
return false, err
381+
}
382+
return account.IsDirty, nil
383+
}
384+
374385
func (c *BunClient) GetDirtyAccounts(ctx context.Context) ([]Account, error) {
375386
if c.store == nil {
376387
return nil, errors.New("no store available")

0 commit comments

Comments
 (0)