Skip to content
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

Merged
merged 14 commits into from
Aug 19, 2024
Merged

[Patch] Fix update issue #92

merged 14 commits into from
Aug 19, 2024

Conversation

hkdeman
Copy link
Contributor

@hkdeman hkdeman commented Aug 19, 2024

No description provided.

modelorona and others added 14 commits August 14, 2024 22:01
* 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
)

* feat(frontend): add mutli select on table with delete and export

* feat(frontend): fix exported terminology

* feat(frontend): fix up table checkbox indexes

* feat(frontend): fix checkbox to be branded
* 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

This query depends on a
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

This query depends on a
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

This query depends on a
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

This query depends on a
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

This query depends on a
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

This query depends on a
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

This query depends on a
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

This query depends on a
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

This query depends on a
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

This query depends on a
user-provided value
.
This query depends on a
user-provided value
.
This query depends on a user-provided value.
@hkdeman hkdeman closed this Aug 19, 2024
@hkdeman hkdeman reopened this Aug 19, 2024
@hkdeman hkdeman merged commit 972678c into release Aug 19, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants