Giter Club home page Giter Club logo

Comments (6)

artelk avatar artelk commented on July 26, 2024 3

Jinq has a potential to be the best (the only really good) Java ORM. Why it's not super-popular? 😄

from jinq.

my2iu avatar my2iu commented on July 26, 2024 3

Writing database queries in Java/C#/etc just generally stopped being popular. Microsoft doesn’t even push LINQ that much even more. Using LINQ or Jinq skillfully requires programmers to understand SQL anyway, so it’s probably easier to just work with a SQL-like language entirely instead of forcing programmers to learn an entirely different query language.

Also, the technology behind Jinq is obscure, so I’m basically the only person who can code it up right now. The big software vendors don’t have the expertise to add Jinq-like functionality to their own ORMs, so they have no reason to promote such technology. Without strong demand, there’s no reason for the big software vendors to train up someone with the required compiler/VM/database/symbolic-execution expertise. Right now, the big software vendors are more interested in pushing NoSQL and AI and big data and stuff.

from jinq.

my2iu avatar my2iu commented on July 26, 2024 2

Okay, that’s good to know. I’ll keep it in mind as a possible future feature. It would require writing a bunch of new analysis code for classes to see if they satisfy the usage patterns that you’ve shown. I’ve been thinking about how the framework could be modified to handle stuff like that before. Unfortunately, to be honest, I haven’t had the cycles available to add major features to Jinq in several years, so I probably won’t be able to get to it.

from jinq.

my2iu avatar my2iu commented on July 26, 2024 1

Jinq is normal Java code. Java does not support duck typing or other features needed to get your suggested syntax to work, so Jinq cannot support such functionality.

from jinq.

zdu-strong avatar zdu-strong commented on July 26, 2024 1

@my2iu I like jinq very much, it's amazing, Thank you and all the developers.

For mysql and h2, it works very well.
Recently, I am trying to adapt spanner, and it is going very well so far.

from jinq.

artelk avatar artelk commented on July 26, 2024
import java.util.function.*;

public class MyClass {
    public static void main(String args[]) {
        var a = new A<Integer>();
        var b = a.map(x -> new Object() { int v = x; })
                 .map(o -> new Object() { String s = Integer.toString(o.v); });
    }
}

class A<T> {
    public <R> A<R> map(Function<T, R> f) { return new A<R>(); }
}

This is compilable with Java 10+

UPD:
And without var it works with Java 8:

A<Integer> a = new A<Integer>();
A<String> b = a.map(x -> new Object() { int v = x; })
               .map(o -> new Object() { String s = Integer.toString(o.v); })
               .map(o -> o.s);

from jinq.

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.