fix: 将 libsql-client-go 作为普通目录提交,而非 gitlink
This commit is contained in:
22
go_modules/libsql-client-go/libsql/internal/hrana/batch.go
Normal file
22
go_modules/libsql-client-go/libsql/internal/hrana/batch.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package hrana
|
||||
|
||||
type Batch struct {
|
||||
Steps []BatchStep `json:"steps"`
|
||||
ReplicationIndex *uint64 `json:"replication_index,omitempty"`
|
||||
}
|
||||
|
||||
type BatchStep struct {
|
||||
Stmt Stmt `json:"stmt"`
|
||||
Condition *BatchCondition `json:"condition,omitempty"`
|
||||
}
|
||||
|
||||
type BatchCondition struct {
|
||||
Type string `json:"type"`
|
||||
Step *int32 `json:"step,omitempty"`
|
||||
Cond *BatchCondition `json:"cond,omitempty"`
|
||||
Conds []BatchCondition `json:"conds,omitempty"`
|
||||
}
|
||||
|
||||
func (b *Batch) Add(stmt Stmt, condition *BatchCondition) {
|
||||
b.Steps = append(b.Steps, BatchStep{Stmt: stmt, Condition: condition})
|
||||
}
|
||||
Reference in New Issue
Block a user