feat: implement extractor error handling and batch processing for MSSQL and Postgres
This commit is contained in:
18
internal/app/convert/main.go
Normal file
18
internal/app/convert/main.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package convert
|
||||
|
||||
func ToInt64(v any) (int64, bool) {
|
||||
switch t := v.(type) {
|
||||
case int:
|
||||
return int64(t), true
|
||||
case int8:
|
||||
return int64(t), true
|
||||
case int16:
|
||||
return int64(t), true
|
||||
case int32:
|
||||
return int64(t), true
|
||||
case int64:
|
||||
return int64(t), true
|
||||
default:
|
||||
return 0, false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user