Giter Club home page Giter Club logo

Comments (4)

ianpartridge avatar ianpartridge commented on May 28, 2024

I think this is a good approach. I'll carry on raising SQLite issues as I find them. We can close them in future.

from swift-kuery.

naithar avatar naithar commented on May 28, 2024

@irar2 as mentioned in #52 and this comment: link, I'll move extension discussions to this issue, so there is no multiple issues for the same feature.

In this commit i've implemented an initial implementation of Extensions.

However, we are not sure your injection points are sufficient

Does injection points mean Position that is used by Extendable protocol? It's designed to be query independent, so for every query the Position should be different.

and also the use of priorities in case of several extensions at the same position worries us.

Doest it mean that there should be no multiple extensions on the same position or that usage of priorities could be error prone if not used correctly?

from swift-kuery.

irar2 avatar irar2 commented on May 28, 2024

Hi @naithar,

Yes, by injection points I meant Position, and in my opinion Position is not flexible enough, it defines 5 points (for Select), and we prefer something more universal.

We think that priorities are error prone in this case.

from swift-kuery.

naithar avatar naithar commented on May 28, 2024

@irar2
String's Range could also be used for injection. The building of a query should probably be changed for this to work, since extension should receive parts of query which in SELECT's case is SELECT, FROM, WHERE and the others. It also should be aware of other extensions that is currently applied to the query to not cause any errors.
The extesion's build method could probably be like:

func injectExtension(into queryParts: [String]) -> [String]

or

func injectExtension(into query: String, to: Range) -> String

Priorities was designed to work with Position atm, so it won't be needed if we find a way to inject extension without it.

from swift-kuery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.