Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ac6053a

Browse filesBrowse files
fix(GetConstraintsPertab): Also work with non-lowercase column names (#10)
* fix(GetConstraintsPertab): Also work with non-lowercase column names Possibly closes #6 * Fix for uppercase column (#1) * Fix for uppercase colum + Uppercase columns are being converted to lowercase and hence error'ng out. this is fixed + Bump the version of the mock-data tool * version bump Co-authored-by: Faisal Ali <fai28683@gmail.com>
1 parent ae835c3 commit ac6053a
Copy full SHA for ac6053a

File tree

3 files changed

+4
-4
lines changed
Filter options

3 files changed

+4
-4
lines changed

‎mock.go

Copy file name to clipboardExpand all lines: mock.go
+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
var (
99
programName = "mock"
10-
programVersion = "v2.1"
10+
programVersion = "v2.2"
1111
ExecutionTimestamp = TimeNow()
1212
Path = fmt.Sprintf("%s/%s/%s", os.Getenv("HOME"), programName, ExecutionTimestamp)
1313
)

‎sql.go

Copy file name to clipboardExpand all lines: sql.go
+1-1
Original file line numberDiff line numberDiff line change
@@ -545,4 +545,4 @@ WHERE %[2]s = '%[6]s'
545545
Debugf("query: %s", query)
546546
Fatalf("Error when updating the foreign key for table %s, err: %v", key.Table, err)
547547
}
548-
}
548+
}

‎worker.go

Copy file name to clipboardExpand all lines: worker.go
+2-2
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ DataTypePickerLoop:
158158
// Copy the data to the database table
159159
func CopyData(tab string, col []string, data []string, db *pg.DB) {
160160
// Copy Statement and start loading
161-
copyStatment := fmt.Sprintf(`COPY %s(%s) FROM STDIN WITH CSV DELIMITER '%s' QUOTE e'\x01'`,
162-
tab, strings.Join(col, ","), delimiter)
161+
copyStatment := fmt.Sprintf(`COPY %s("%s") FROM STDIN WITH CSV DELIMITER '%s' QUOTE e'\x01'`,
162+
tab, strings.Join(col, "\",\""), delimiter)
163163
_, err := db.CopyFrom(strings.NewReader(strings.Join(data, delimiter)), copyStatment)
164164

165165
// Handle Error

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.