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

No way to write blob in custom function #124

Open
BrannonKing opened this issue Jun 7, 2021 · 0 comments
Open

No way to write blob in custom function #124

BrannonKing opened this issue Jun 7, 2021 · 0 comments

Comments

@BrannonKing
Copy link

I don't see any way to have blob result when using CreateFunction. I need a custom function that drops the last byte off a blob type. Example:

	v.db.CreateFunction("POPS", true, 1,
		func (c sqlite.Context, v ...sqlite.Value) {
			t := v[0].Blob()
			c.ResultBlob(t[:len(t)-1]) // no such thing (and what would be faster?)
		}, nil, nil)

I need a similar one that reverses all the bytes in a blob. Is there some way to do that in the current code?

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

No branches or pull requests

1 participant