Skip to content

Implement support for simple, aggregate, and window functions #75

@plambert

Description

@plambert

The create_function() support exists, and was added in order to implement the REGEX() callback function. It would be very useful to have a documented Crystal interface to sqlite3_create_function_v2() that could be used similar to this:

@db.create_function returning: Int32.class do |param1, param2|
  # ... do something, returning an Int32
end

Syntax to support returning an array, handling aggregate functions, and handling window functions would be (hopefully) similar.

In addition, for my uses, it doesn't need to be exposed through DB; this is obviously for use cases that are very specific to SQLite and not portable, so having a different interface than Database::DB would be perfectly acceptable, though obviously a lot of the functionality would have to be duplicated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions