mirror of
https://github.com/chaisql/chai.git
synced 2025-10-08 00:50:52 +08:00
Ignore table config store
This commit is contained in:
2
db.go
2
db.go
@@ -325,7 +325,7 @@ func (tx Tx) ListTables() ([]string, error) {
|
|||||||
idxPrefix := indexPrefix + string([]byte{separator})
|
idxPrefix := indexPrefix + string([]byte{separator})
|
||||||
|
|
||||||
for _, st := range stores {
|
for _, st := range stores {
|
||||||
if st == indexTable {
|
if st == indexStoreName || st == tableConfigStoreName {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(st, idxPrefix) {
|
if strings.HasPrefix(st, idxPrefix) {
|
||||||
|
@@ -844,12 +844,12 @@ func TestTxListTables(t *testing.T) {
|
|||||||
tx, cleanup := newTestDB(t)
|
tx, cleanup := newTestDB(t)
|
||||||
defer cleanup()
|
defer cleanup()
|
||||||
|
|
||||||
_, err := tx.CreateTable("a")
|
err := tx.CreateTable("a", nil)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
_, err = tx.CreateTable("b")
|
err = tx.CreateTable("b", nil)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
_, err = tx.CreateIndex(index.Options{
|
err = tx.CreateIndex(index.Options{
|
||||||
IndexName: "idxa",
|
IndexName: "idxa",
|
||||||
TableName: "a",
|
TableName: "a",
|
||||||
FieldName: "foo",
|
FieldName: "foo",
|
||||||
|
Reference in New Issue
Block a user