Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

coffe-cafe-zed
Copy link

I have been using ent with https://turso.tech in development for a couple of month now and everything is working well except for creating records using ent.

Whenever I call .Save() function, the record will be created but and error will be returned. I dug into the issue and found that libsql does not support the "RETURNING" clause, just like MySQL.

This change is working well for me, but I am not sure if I need to do a full libsql driver.

Example connection:

	drv, err := sql.Open("libsql", viper.GetString("turso_database_url")+"?authToken="+viper.GetString("turso_auth_token"))
	if err != nil {
		config.Logger.Error("failed to open db", zap.Error(err))
		os.Exit(1)
	}

	Client := gen.NewClient(gen.Driver(drv))

@a8m
Copy link
Member

a8m commented Sep 1, 2025

I think you can do this instead: #1667 (comment)

We don’t have the capacity to support Turso as non of us is using this service atm.

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