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 — ModelBuilder: support indexMaxValueLength. · heyujava/objectbox-java@c8101c5

File tree

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

‎objectbox-java/src/main/java/io/objectbox/ModelBuilder.java‎

Copy file name to clipboardExpand all lines: objectbox-java/src/main/java/io/objectbox/ModelBuilder.java
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public class PropertyBuilder {
6363
private long uid;
6464
private int indexId;
6565
private long indexUid;
66+
private int indexMaxValueLength;
6667

6768
PropertyBuilder(String name, @Nullable String targetEntityName, @Nullable String virtualTarget, int type) {
6869
this.type = type;
@@ -85,6 +86,12 @@ public PropertyBuilder indexId(int indexId, long indexUid) {
8586
return this;
8687
}
8788

89+
public PropertyBuilder indexMaxValueLength(int indexMaxValueLength) {
90+
checkNotFinished();
91+
this.indexMaxValueLength = indexMaxValueLength;
92+
return this;
93+
}
94+
8895
public PropertyBuilder flags(int flags) {
8996
checkNotFinished();
9097
this.flags = flags;
@@ -125,6 +132,9 @@ public int finish() {
125132
int indexIdOffset = IdUid.createIdUid(fbb, indexId, indexUid);
126133
ModelProperty.addIndexId(fbb, indexIdOffset);
127134
}
135+
if (indexMaxValueLength > 0) {
136+
ModelProperty.addMaxIndexValueLength(fbb, indexMaxValueLength);
137+
}
128138
ModelProperty.addType(fbb, type);
129139
if (flags != 0) {
130140
ModelProperty.addFlags(fbb, flags);

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.