Giter Site home page Giter Site logo

nexusdata's People

Contributors

csnagy avatar dkharrat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nexusdata's Issues

NSMergeByPropertyObjectTrumpMergePolicy

Hi!

In CoreData it is possible to set mergePolicy.

context!.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy.

Sometimes upserting managedObjects is quite frequent and queriing by ID and upsetting mo would create two records. But NSMergeByPropertyObjectTrumpMergePolicy prevent it. Is it possible somehow in nexus data?

SUBQUERY in NexusData

NexusData does have SUBQUERY language element from Core Data, like this:

let fr2: NSFetchRequest<Item> = Item.fetchRequest()
fr2.predicate = NSPredicate(format: "SUBQUERY(ratings, $r, ($r.userSetting.id = %@ AND $r.scale > 0)).@count = 0 AND SUBQUERY(ratings, $r, ($r.userSetting.id != %@ AND $r.scale > 0)).@count > 0", loggedInUserID!, loggedInUserID!)

Data mirgration upon db version update is not working

Hello,

Today came across this api and its cool. To find coredata model structure for android.
I am sucessfull in building all projects and getting ToDo sample.

It running fine until I got db version updated from 3->4 where i changed some column name and added one new and remove one from old. And things worked fine, but i come across an issue of Data got lost.
Where in case of iOS their is no such case.

Also i am have started working over a UI plugin for handling db-strucure in somewhat similar way we have for iOS.
So my plan forth is to get a perspective ready for db modle like we have xdatamodel in iOS. We can create similar and in the UI editor we can provide a feature to create table entities and attributes. Also we can enhance it to handle Predicates too.

Thnx for helping such a realistic problem for android developer where core-data relation is to be handled manually by developers where we can maintain same in CoreData Model.

Orderedset instead of Set?

Is it possible to get back ordered set instead of set in nexus data? Implement i.e. _User class differently, than recently?

 @SuppressWarnings("unchecked")
    public Set<Task> getTasks() {
        return (Set<Task>)getValue(Property.TASKS);
    }

BTW do you now why is no "ordered" descriptor possible to set in model scheme?

What is wrong with predicate?

demand != null && demand.satisfied == false && gender == "male"

I have the following predicate, and app crashes. Why?

I guess constants are OK, based on this:
lexerGrammar.add("(\"[^\"\\\\\\r\\n]*(?:\\\\.[^\"\\\\\\r\\n]*)*\")|\\d+|true|false|null", TokenType.CONSTANT);

comparators too:

 lexerGrammar.add("\\(",     TokenType.OPEN_PAREN);
        lexerGrammar.add("\\)",     TokenType.CLOSE_PAREN);
        lexerGrammar.add("&&",      TokenType.AND);
        lexerGrammar.add("\\|\\|",  TokenType.OR);
        lexerGrammar.add("==",      TokenType.EQUAL);
        lexerGrammar.add("!=",      TokenType.NOT_EQUAL);
        lexerGrammar.add(">=",      TokenType.GREATER_THAN_OR_EQUAL);
        lexerGrammar.add("<=",      TokenType.LESS_THAN_OR_EQUAL);
        lexerGrammar.add(">",       TokenType.GREATER_THAN);
        lexerGrammar.add("<",       TokenType.LESS_THAN);
        lexerGrammar.add("(\"[^\"\\\\\\r\\n]*(?:\\\\.[^\"\\\\\\r\\n]*)*\")|\\d+|true|false|null",       TokenType.CONSTANT);
        lexerGrammar.add("[a-zA-Z][a-zA-Z0-9_]*",   TokenType.FIELD_NAME);

Where is pom.xml located?

I am a bit newbie in Android development. Have more experience in iOS development. Have a Mac and Android Studio. How can I 'Add the following dependency to your pom.xml file for your project:' ?I do not find pom.xml in my project I just created. Do I have to install first Maven? Or is it coming with Android Studio?

why it's "not yet optimized for large data sets"

First thanks for this project, it's awesome! So I was trying to figure the reason why you said the above in the Limitations list. From what I can tell the ManagedObjects registered from fetches are never unregistered, and their corresponding entry in the entityCache is never removed, thus the memory will never be freed for objects that are queried but not deleted. I would imagine that CoreData on the Mac makes use of reference counting to decide when it is suitable to release a ManagedObject from the cache. It likely monitors if any of the objects have a reference count of 1 and if so removes them from the context's object array, resulting in a release. I had a quick look at it seems Java doesn't have any mechanism to detect if an object is referenced by any other making this quite a challenging problem to solve elegantly. Since the feature is likely a long way off, as a work around in the mean time would you consider making a temporary method that both unregisters the object and also removes it from the entityCache? Perhaps make unregisterObject public then in ManagedObject setManagedObjectContext it could check if its null and if so it could get the cacheNode and remove it? My reason for this method would be although we don't have a way to track when the right time is to free an object, at least having the method to do it would be a good start.

gradle not found when trying to generate model files

Where should I put in the following command on a Mac, in terminal? Gradle shuld be preinstalled on my Mac?

gradle :modelgen:run -Pargs="-f /path/to/model/todo.model.json -O /path/to/output/src/main/java"

I do not see gradle script in the project folder.

Kukodas-MacBook-Air:MovieBuffs3 kukodajanos$ ls
MovieBuffs3.iml gradle local.properties
app gradle.properties settings.gradle
build gradlew
build.gradle gradlew.bat
Kukodas-MacBook-Air:MovieBuffs3 kukodajanos$ gradle
-bash: gradle: command not found

[BUG] PredicateToSQL

Hello, i create predicate like this:
PredicateBuilder.parse("createDate != null").
I gets java.lang.NullPointerException at com.github.dkharrat.nexusdata.store.DatabaseQueryService$QueryBuilder.visit(PredicateToSQL.java:85) at com.github.dkharrat.nexusdata.store.DatabaseQueryService$QueryBuilder.visit(PredicateToSQL.java:166) at com.github.dkharrat.nexusdata.store.DatabaseQueryService$QueryBuilder.visit(PredicateToSQL.java:137) at com.github.dkharrat.nexusdata.store.DatabaseQueryService$QueryBuilder.visit(PredicateToSQL.java:156) at com.github.dkharrat.nexusdata.store.DatabaseQueryService$QueryBuilder.visit(PredicateToSQL.java:116) at com.github.dkharrat.nexusdata.store.DatabaseQueryService$QueryBuilder.visit(PredicateToSQL.java:154) at com.github.dkharrat.nexusdata.store.DatabaseQueryService.buildQuery(PredicateToSQL.java:62) at com.github.dkharrat.nexusdata.store.DatabaseQueryService.query(PredicateToSQL.java:41) at com.github.dkharrat.nexusdata.store.AndroidSqlPersistentStore.executeFetchRequest(AndroidSqlPersistentStore.java:85) at com.github.dkharrat.nexusdata.core.ObjectContext.executeFetchOperation(ObjectContext.java:120)

FetchRequest does not return

I have an ordinary FetchRequest as tutorial write, but it does not return:

FetchRequest<Record> fetchRequest = c.newFetchRequestBuilder(Record.class)
                .predicate("id == " + id)
                .build();
List<Record> records = c.executeFetchOperation(fetchRequest);

id is a string. Lines are executed from a serial queue. context was created on the same thread where call is now. Debugger does not reach c.executeFetchOperation line. @dkharrat do you have any idea what is wrong?

PredicateBuilder

I create a Predicate:
Predicate predicate = PredicateBuilder.parse("testId == 53c7eaf909c7d69602013c68");
and
System.out.println(predicate) return (testId EQUAL 53).

Parent Entity supported?

Is Parent Entity supported. Tried to set superEntityName but it is not processed?!

"entities": [{
      "name": "Record",
      "attributes": [{
        "name": "id",
        "type": "String"
      }]
    }, {
      "name": "Item",
      "superEntityName" : "Record",

In ObjectModelJsonParser there is a static class called Entity. It has superEntity field. Strange though from Json it does not read up value.

    static class Entity {
        String name;
        @SerializedName("extends") String superEntityName;
        List<Attribute> attributes;
        List<Relationship> relationships;
        List<EnumProperty> enums;
    }

keypath in predicate?

Am I right that predicate does not accept keypath, only key? i.e. will not work?

"item.id == "tt2707408" AND userSetting.id == "625345927616512""

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.