Skip to content

No way to write blob in custom function #124

Open
@BrannonKing

Description

@BrannonKing

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions