Regex description

This commit is contained in:
Ignat Belousov 2023-08-05 13:01:32 +03:00
parent dc16c76b93
commit 72328dbc8a
4 changed files with 4 additions and 18 deletions

View File

@ -28,7 +28,7 @@ func isPrintable(s string) bool {
return true
}
// TODO:
// A list of Go types that should be converted to SQL primitives
var convertibleTypes = []reflect.Type{reflect.TypeOf(time.Time{}), reflect.TypeOf(false), reflect.TypeOf([]byte{})}
// RegEx matches only numeric values

View File

@ -25,6 +25,8 @@ import (
// -"%$#@789"
var regFullDataType = regexp.MustCompile(`\D*(\d+)\D?`)
// TODO:? Create const vars for raw sql queries ?
// Migrator m struct
type Migrator struct {
Config

View File

@ -23,7 +23,7 @@ require (
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/mattn/go-sqlite3 v1.14.17 // indirect
github.com/microsoft/go-mssqldb v1.5.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/text v0.12.0 // indirect
)

View File

@ -15,22 +15,6 @@ then
cd ..
fi
# Function for checking if binary is installed
check_binary() {
if ! which "$1" > /dev/null; then
( >&2 echo "$2" )
# Exit with a nonzero code so that the caller knows the script failed.
exit 1
fi
}
check_binary "sqlcmd" "$(cat <<EOF
You will need microsoft/sqlcmd to run this script.
Install it using your package manager. E.g. for homebrew:
brew install sqlcmd
EOF
)"
# SqlServer for Mac M1
if [[ -z $GITHUB_ACTION ]]; then
if [ -d tests ]