Skip to content

Commit

Permalink
Merge pull request #7 from knocknote/feature/support-distributed-tran…
Browse files Browse the repository at this point in the history
…saction

Supports Distributed Transaction
  • Loading branch information
goccy authored Dec 11, 2018
2 parents a4e5450 + 14e8790 commit 84d3156
Show file tree
Hide file tree
Showing 20 changed files with 1,655 additions and 282 deletions.
26 changes: 26 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "70...100"

status:
project: yes
patch: no
changes: no

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

comment:
layout: "header, diff"
behavior: default
require_changes: no
4 changes: 3 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ func (c *TableConfig) Error() error {

// A Config is a database configuration includes database sharding definition.
type Config struct {
// distributed transaction support
DistributedTransaction bool `yaml:"distributed_transaction"`
// map table name and configuration
Tables map[string]*TableConfig `yaml:"tables"`
}
Expand Down Expand Up @@ -146,7 +148,7 @@ func Load(configPath string) (*Config, error) {
if err != nil {
return nil, errors.WithStack(err)
}
var config *Config
config := &Config{DistributedTransaction: true}
if err := yaml.Unmarshal(yamlFile, &config); err != nil {
return nil, errors.WithStack(err)
}
Expand Down
Loading

0 comments on commit 84d3156

Please sign in to comment.