2025-03-06 15:39:45 +05:30
|
|
|
package sqlstoretest
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
|
|
|
|
|
"github.com/uptrace/bun"
|
|
|
|
|
)
|
|
|
|
|
|
2025-03-25 04:05:40 +05:30
|
|
|
type dialect struct {
|
2025-03-06 15:39:45 +05:30
|
|
|
}
|
|
|
|
|
|
2025-03-25 04:05:40 +05:30
|
|
|
func (dialect *dialect) MigrateIntToTimestamp(ctx context.Context, bun bun.IDB, table string, column string) error {
|
2025-03-06 15:39:45 +05:30
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-25 04:05:40 +05:30
|
|
|
func (dialect *dialect) MigrateIntToBoolean(ctx context.Context, bun bun.IDB, table string, column string) error {
|
2025-03-06 15:39:45 +05:30
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-25 04:05:40 +05:30
|
|
|
func (dialect *dialect) GetColumnType(ctx context.Context, bun bun.IDB, table string, column string) (string, error) {
|
2025-03-06 15:39:45 +05:30
|
|
|
return "", nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-25 04:05:40 +05:30
|
|
|
func (dialect *dialect) ColumnExists(ctx context.Context, bun bun.IDB, table string, column string) (bool, error) {
|
2025-03-06 15:39:45 +05:30
|
|
|
return false, nil
|
|
|
|
|
}
|
2025-03-25 04:05:40 +05:30
|
|
|
|
|
|
|
|
func (dialect *dialect) RenameColumn(ctx context.Context, bun bun.IDB, table string, oldColumnName string, newColumnName string) (bool, error) {
|
|
|
|
|
return true, nil
|
|
|
|
|
}
|
2025-03-25 22:02:34 +05:30
|
|
|
|
2025-04-04 01:46:28 +05:30
|
|
|
func (dialect *dialect) RenameTableAndModifyModel(ctx context.Context, bun bun.IDB, oldModel interface{}, newModel interface{}, references []string, cb func(context.Context) error) error {
|
2025-03-25 22:02:34 +05:30
|
|
|
return nil
|
|
|
|
|
}
|
2025-04-01 23:49:37 +05:30
|
|
|
|
|
|
|
|
func (dialect *dialect) AddNotNullDefaultToColumn(ctx context.Context, bun bun.IDB, table string, column, columnType, defaultValue string) error {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
2025-04-03 23:26:49 +05:30
|
|
|
|
2025-04-04 01:25:24 +05:30
|
|
|
func (dialect *dialect) UpdatePrimaryKey(ctx context.Context, bun bun.IDB, oldModel interface{}, newModel interface{}, reference string, cb func(context.Context) error) error {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (dialect *dialect) AddPrimaryKey(ctx context.Context, bun bun.IDB, oldModel interface{}, newModel interface{}, reference string, cb func(context.Context) error) error {
|
2025-04-03 23:26:49 +05:30
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (dialect *dialect) IndexExists(ctx context.Context, bun bun.IDB, table string, index string) (bool, error) {
|
|
|
|
|
return false, nil
|
|
|
|
|
}
|