GithubHelp home page GithubHelp logo

Comments (9)

mqus avatar mqus commented on July 21, 2024 3

Hi! the current state of android development pushed me to flutter and yesterday I found your library which seems to perfectly replace room. I would really like to see the @DatabaseViews in floor like I had them in room:

@DatabaseView("SELECT collection, artist AS name, group_concat(DISTINCT genre) AS genres, count(*) AS count FROM files GROUP BY artist, collection")
public class Artist {
	String collection;
	String name;
	String genres;
	int count;
}

I just got into flutter/dart yesterday, so I can't really help in implementing this but I would really like to see some progress here!

(I know, this is just a wordy +1, but I really want to motivate it!)

from floor.

vitusortner avatar vitusortner commented on July 21, 2024

Hi @megasoft78! I'm happy to see your interest in the package. To your first request: It's planned to support returning objects for queries that are not entities. #33 holds some more information about this feature request. To your second request: This behavior is also planned. #12 describes the feature.

I've seen you forked the repository. Do you plan on implementing the behavior? Would be great to see a PR!

from floor.

megasoft78 avatar megasoft78 commented on July 21, 2024

Hi @vitusortner,
I'm new to Flutter and Dart as I mainly work on C# but I'm looking to implement #12.
My idea is to add a new annotation to ColumnInfo : readonly. I did that but I'm learning where to change the code in order to achieve this feature.
I'm looking for all the CRUD operations and skip the field with readonly annotation for Create, Update and Delete.
Could you give me some info on where to look and how is structured?

from floor.

mqus avatar mqus commented on July 21, 2024

I think this can be closed now, as 90% of the DatabaseView features are implemented and the remaining 10% (Streams on Views) open a whole new can of worms :)

from floor.

mqus avatar mqus commented on July 21, 2024

I'm closing this as this seems to be adressed now, with Streams of DatabaseView queries also coming soon.

from floor.

mqus avatar mqus commented on July 21, 2024

The general issue (parsing the results of arbitrary queries into objects) is tracked in #94

from floor.

moak13 avatar moak13 commented on July 21, 2024

Hi, I have a question. Am not totally sound on this but need assistance. I have entities [A, B] created and would like to know how to implement a Join by id from B (child) to A (parent), where both hold a list of items.

from floor.

mqus avatar mqus commented on July 21, 2024

You could create a database view which has the join as the query and its result columbs as fields. You can then make a query on that view to return the results of that join.

from floor.

ulugbekusmanov avatar ulugbekusmanov commented on July 21, 2024

Hi! the current state of android development pushed me to flutter and yesterday I found your library which seems to perfectly replace room. I would really like to see the @DatabaseViews in floor like I had them in room:

@DatabaseView("SELECT collection, artist AS name, group_concat(DISTINCT genre) AS genres, count(*) AS count FROM files GROUP BY artist, collection")
public class Artist {
	String collection;
	String name;
	String genres;
	int count;
}

I just got into flutter/dart yesterday, so I can't really help in implementing this but I would really like to see some progress here!

(I know, this is just a wordy +1, but I really want to motivate it!)

do yo have full example for left join

from floor.

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.