GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PropertyFlags: added unique on-conflict flags · mimoccc/objectbox-java@bd2dd93

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • objectbox-java/src/main/java/io/objectbox/model
    • PropertyFlags.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎objectbox-java/src/main/java/io/objectbox/model/PropertyFlags.java‎

Copy file name to clipboardExpand all lines: objectbox-java/src/main/java/io/objectbox/model/PropertyFlags.java
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,28 @@ private PropertyFlags() { }
7474
* (recommended mostly for 64 bit machines with values longer >200 bytes; small values are faster with a 32 bit hash)
7575
*/
7676
public static final int INDEX_HASH64 = 4096;
77+
/**
78+
* Unused yet: While our default are signed ints, queries (& indexes) need do know signing info
79+
*/
80+
public static final int UNSIGNED = 8192;
81+
/**
82+
* Unique on-conflict strategy: ignore the offending object (no changes to the existing conflicting object).
83+
* If there are multiple unique properties in an entity, this strategy is evaluated first:
84+
* if the property conflicts, no other properties will be checked for conflicts.
85+
*/
86+
public static final int UNIQUE_ON_CONFLICT_IGNORE = 16384;
87+
/**
88+
* Unique on-conflict strategy: the offending object replaces the existing conflicting object (deletes it).
89+
* If there are multiple properties using this strategy, a single put can potentially replace (delete) multiple
90+
* existing objects.
91+
*/
92+
public static final int UNIQUE_ON_CONFLICT_REPLACE = 32768;
93+
/**
94+
* Unique on-conflict strategy: the offending object overwrites the existing conflicting object while keeping
95+
* its ID. Thus, all relations pointing to the existing entity stay intact.
96+
* This is useful for a "secondary" ID, e.g. a string "ID".
97+
* Within an entity, this strategy may be used once only (update target would be ambiguous otherwise).
98+
*/
99+
public static final int UNIQUE_ON_CONFLICT_UPDATE = 65536;
77100
}
78101

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.