Skip to content
This repository was archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.
This repository was archived by the owner on Sep 7, 2021. It is now read-only.

Using raw db connection for creating object #721

Open
@snktagarwal

Description

@snktagarwal

Hi Xorm team,

Firstly thanks for writing this awesome ORM tool! Golang is still in its initial stages so its good to see some mature code out there!

I am using Google's Cloud offering and they have a CloudSql proxy (which talks mysql internally). Although since your constructor does not take an actual db object (and say that it's SQL) I cannot use xorm unless I deconstruct either yours or cloudsql proxy code.

This is how I currently instantiate an object in my code:

config.Addr = instanceName config.User = dbUser config.Passwd = dbPass config.DBName = dbName db, err = cloudsqldialer.DialCfg(&config)

The code for cloudsql is here: github.com/GoogleCloudPlatform/cloudsql-proxy

Any help appreciated

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions