push
github
0 of 17 new or added lines in 1 file covered. (0.0%)
6700 of 10041 relevant lines covered (66.73%)
113.55 hits per line
1 |
package postgres
|
|
2 |
|
|
3 |
import "sort" |
|
4 |
|
|
5 |
const (
|
|
6 |
RelationTuplesTable = "relation_tuples"
|
|
7 |
AttributesTable = "attributes"
|
|
8 |
SchemaDefinitionTable = "schema_definitions"
|
|
9 |
TransactionsTable = "transactions"
|
|
10 |
TenantsTable = "tenants"
|
|
11 |
BundlesTable = "bundles"
|
|
12 |
) |
|
13 |
|
|
14 |
// isSameArray - check if two arrays are the same
|
|
NEW
|
func isSameArray(a, b []string) bool { |
× |
NEW
|
if len(a) != len(b) { |
× |
NEW
|
return false |
× |
NEW
|
} |
× |
19 |
|
|
NEW
|
sortedA := make([]string, len(a)) |
× |
NEW
|
copy(sortedA, a)
|
× |
NEW
|
sort.Strings(sortedA) |
× |
NEW
|
|
× |
NEW
|
sortedB := make([]string, len(b)) |
× |
NEW
|
copy(sortedB, b)
|
× |
NEW
|
sort.Strings(sortedB) |
× |
NEW
|
|
× |
NEW
|
for i := range sortedA { |
× |
NEW
|
if sortedA[i] != sortedB[i] {
|
× |
NEW
|
return false |
× |
NEW
|
} |
× |
32 |
} |
|
33 |
|
|
NEW
|
return true |
× |
35 |
} |