(data interface{}, isLeader bool)
| 108 | } |
| 109 | |
| 110 | func (s *sqliteStorage) Commit(data interface{}, isLeader bool) (result interface{}, err error) { |
| 111 | var d *queryStructure |
| 112 | var ok bool |
| 113 | if d, ok = data.(*queryStructure); !ok { |
| 114 | err = errors.New("invalid data") |
| 115 | return |
| 116 | } |
| 117 | |
| 118 | result, err = s.st.Exec(context.Background(), d.Queries) |
| 119 | |
| 120 | return |
| 121 | } |
| 122 | |
| 123 | func (s *sqliteStorage) Query(ctx context.Context, queries []storage.Query) (columns []string, types []string, |
| 124 | data [][]interface{}, err error) { |