mirror of
https://github.com/chaisql/chai.git
synced 2025-10-07 00:23:17 +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})
|
||||
|
||||
for _, st := range stores {
|
||||
if st == indexTable {
|
||||
if st == indexStoreName || st == tableConfigStoreName {
|
||||
continue
|
||||
}
|
||||
if strings.HasPrefix(st, idxPrefix) {
|
||||
|
@@ -844,12 +844,12 @@ func TestTxListTables(t *testing.T) {
|
||||
tx, cleanup := newTestDB(t)
|
||||
defer cleanup()
|
||||
|
||||
_, err := tx.CreateTable("a")
|
||||
err := tx.CreateTable("a", nil)
|
||||
require.NoError(t, err)
|
||||
_, err = tx.CreateTable("b")
|
||||
err = tx.CreateTable("b", nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
_, err = tx.CreateIndex(index.Options{
|
||||
err = tx.CreateIndex(index.Options{
|
||||
IndexName: "idxa",
|
||||
TableName: "a",
|
||||
FieldName: "foo",
|
||||
|
Reference in New Issue
Block a user