-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Patch] Fix update issue #92
Conversation
Create CONTRIBUTING.md
Create CODE_OF_CONDUCT.md
* add tentative delete functionality for postgres + several small UI tweaks * added somewhat dirty function to handle double escape on the editor window * update name from DeleteStorageUnit to DeleteRow * update the psql GetRows to use existing getPrimaryKeyColumn func (need to use connection pooling at some point instead of opening db) * fix psql primary key sort * update wording from update to delete for delete fuc * add delete for mysql * add delete for sqlite * update quote addition * add simple row delete for mongo * add simple delete for redis * add gitignore * add delete for elasticsearch
* Revert "Revert "feat(core): add llm interface"" This reverts commit 41eaa0c. * feat(core): add chat prompts to get sql queries and resolvers for chat graphql endpoint feat(frontend): add whole chat interface to show code correctly and switch between tables * feat(frontend): make sql code editable in chat * feat(frontend): fix preview furhter and update bug
} | ||
|
||
tableName := fmt.Sprintf("%s.%s", schema, storageUnit) | ||
dbConditions := db.Table(tableName) |
Check failure
Code scanning / CodeQL
Database query built from user-controlled sources High
user-provided value
This query depends on a
user-provided value
This query depends on a user-provided value.
tableName := fmt.Sprintf("%s.%s", schema, storageUnit) | ||
dbConditions := db.Table(tableName) | ||
for key, value := range conditions { | ||
dbConditions = dbConditions.Where(fmt.Sprintf("%s = ?", key), value) |
Check failure
Code scanning / CodeQL
Database query built from user-controlled sources High
user-provided value
This query depends on a user-provided value.
dbConditions = dbConditions.Where(fmt.Sprintf("%s = ?", key), value) | ||
} | ||
|
||
result := dbConditions.Table(tableName).Delete(convertedValues) |
Check failure
Code scanning / CodeQL
Database query built from user-controlled sources High
user-provided value
This query depends on a
user-provided value
This query depends on a user-provided value.
@@ -55,7 +53,7 @@ | |||
tableName := fmt.Sprintf("%s.%s", schema, storageUnit) | |||
dbConditions := db.Table(tableName) | |||
for key, value := range conditions { | |||
dbConditions = dbConditions.Where(fmt.Sprintf("%s = ?", key), value) | |||
dbConditions = dbConditions.Where(fmt.Sprintf("\"%s\" = ?", key), value) |
Check failure
Code scanning / CodeQL
Database query built from user-controlled sources High
user-provided value
} | ||
|
||
tableName := fmt.Sprintf("%s.%s", schema, storageUnit) | ||
dbConditions := db.Table(tableName) |
Check failure
Code scanning / CodeQL
Database query built from user-controlled sources High
user-provided value
This query depends on a
user-provided value
This query depends on a user-provided value.
} | ||
} | ||
|
||
dbConditions := db.Table(storageUnit) |
Check failure
Code scanning / CodeQL
Database query built from user-controlled sources High
user-provided value
This query depends on a user-provided value.
|
||
dbConditions := db.Table(storageUnit) | ||
for key, value := range conditions { | ||
dbConditions = dbConditions.Where(fmt.Sprintf("%s = ?", key), value) |
Check failure
Code scanning / CodeQL
Database query built from user-controlled sources High
user-provided value
This query depends on a user-provided value.
dbConditions = dbConditions.Where(fmt.Sprintf("%s = ?", key), value) | ||
} | ||
|
||
result := dbConditions.Table(storageUnit).Delete(convertedValues) |
Check failure
Code scanning / CodeQL
Database query built from user-controlled sources High
user-provided value
This query depends on a user-provided value.
@@ -50,7 +47,7 @@ | |||
|
|||
dbConditions := db.Table(storageUnit) | |||
for key, value := range conditions { | |||
dbConditions = dbConditions.Where(fmt.Sprintf("%s = ?", key), value) | |||
dbConditions = dbConditions.Where(fmt.Sprintf("\"%s\" = ?", key), value) |
Check failure
Code scanning / CodeQL
Database query built from user-controlled sources High
user-provided value
var primaryKeys []string | ||
columnTypes := make(map[string]string) | ||
pragmaQuery := fmt.Sprintf("PRAGMA table_info(%s)", tableName) | ||
rows, err := db.Raw(pragmaQuery, tableName).Rows() |
Check failure
Code scanning / CodeQL
Database query built from user-controlled sources High
user-provided value
This query depends on a
user-provided value
This query depends on a user-provided value.
No description provided.