Skip to content

Conversation

@tangyoupeng
Copy link
Contributor

No description provided.

pkg/meta/sql.go Outdated
}

func (m *dbMeta) doLoadToken(ctx Context, id uint32) (token []byte, st syscall.Errno) {
err := m.roTxn(ctx, func(s *xorm.Session) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simpleTxn

}

func (m *dbMeta) doUpdateToken(ctx Context, id uint32, token []byte) syscall.Errno {
return errno(m.txn(func(s *xorm.Session) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need for Get.
Determine the affected rows based on the return value of Update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants