-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Added bigquery dialect and Gorm's BigQuery driver as dependency #238
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 12735576880Details
💛 - Coveralls |
This PR looks good to me. I think it's on GORM's end, but I can't make it work at all. The query arguments (
Query: SELECT * FROM `some_table` WHERE `id` = ? ORDER BY `some_table`.`id` LIMIT ? Repo method: func (r *SomeRepo) GetByID(ctx context.Context, id uint) (*model.SomeModel, error) {
var result *model.SomeModel
db := session.DB(ctx, r.DB).Where("id", id).First(&result)
return result, errors.New(db.Error)
} Have you managed to make it work on your end? |
Please add the following: // New create a new connection pool using the settings defined in the given configuration.
//
// In order to use a specific driver / dialect ("mysql", "sqlite3", ...), you must not
// forget to blank-import it in your main file.
//
// import _ "goyave.dev/goyave/v5/database/dialect/mysql"
// import _ "goyave.dev/goyave/v5/database/dialect/postgres"
// import _ "goyave.dev/goyave/v5/database/dialect/sqlite"
// import _ "goyave.dev/goyave/v5/database/dialect/mssql"
// import _ "goyave.dev/goyave/v5/database/dialect/clickhouse"
+ // import _ "goyave.dev/goyave/v5/database/dialect/bigquery"
func New(cfg *config.Config, logger func() *slog.Logger) (*gorm.DB, error) { |
Hey @System-Glitch I'll add the import comment. Regarding the query with placeholders Any way I'll check more and get back to you on this. |
I think I found the issue. This driver is unusable in its current state, let's wait for that issue to be solved before merging this. |
Sure no worries |
References
Issue(s): #196
Description
This PR adds support to work with BigQuery database using Gorm's BigQuery driver v1.2.0
Data Source Name for BigQuery contains
project-id
,location
,dataset
.Among these
location
is optional.Also
options
contains various optional values in query string format.name
=project_id[/location_id]/dataset_id
options
=option1=value1&option2=value2