Skip to content

Commit

Permalink
update generator dependency to v0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Apr 1, 2021
1 parent 4ea929f commit 387ac36
Show file tree
Hide file tree
Showing 15 changed files with 790 additions and 29 deletions.
2 changes: 1 addition & 1 deletion examples/tasks/internal/model/objectbox-model.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/tasks/internal/model/task.obx.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -4,5 +4,5 @@ go 1.11

require (
github.com/google/flatbuffers v1.12.0
github.com/objectbox/objectbox-generator v0.12.0
github.com/objectbox/objectbox-generator v0.13.0
)
5 changes: 2 additions & 3 deletions go.sum
@@ -1,5 +1,4 @@
github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
github.com/google/flatbuffers v1.12.0 h1:/PtAHvnBY4Kqnx/xCQ3OIV9uYcSFGScBsWI3Oogeh6w=
github.com/google/flatbuffers v1.12.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
github.com/objectbox/objectbox-generator v0.12.0 h1:kLDUqCl3YgJZVkQAiYWPDht6ZTQaZjm9U+t535lYAcc=
github.com/objectbox/objectbox-generator v0.12.0/go.mod h1:2jUhmjcgZ/W2R1Hn+DsGYfo9GV0ffLtkipB27dJ13CI=
github.com/objectbox/objectbox-generator v0.13.0 h1:WyI97psLk3FLw/qGsVIMl49HCSyuFwVekBdIbQDrxXE=
github.com/objectbox/objectbox-generator v0.13.0/go.mod h1:kanX8YAsG9Fi9tufV0iLMAKfV+d4WLAvSj5rtL01WhQ=
2 changes: 1 addition & 1 deletion test/model/byvalue.obx.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions test/model/entity.obx.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions test/model/iot/model.obx.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/model/iot/objectbox-model.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/model/iot/objectbox-model.json
Expand Up @@ -59,7 +59,7 @@
"name": "EventId",
"indexId": "2:2642563953244304959",
"type": 11,
"flags": 8712,
"flags": 520,
"relationTarget": "Event"
},
{
Expand Down
6 changes: 4 additions & 2 deletions test/model/objectbox-model.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 43 additions & 5 deletions test/model/objectbox-model.json
Expand Up @@ -126,23 +126,23 @@
"name": "Related",
"indexId": "1:7297830522090799401",
"type": 11,
"flags": 8712,
"flags": 520,
"relationTarget": "TestEntityRelated"
},
{
"id": "23:2938782103279095882",
"name": "RelatedPtr",
"indexId": "2:1636618737379039866",
"type": 11,
"flags": 8712,
"flags": 520,
"relationTarget": "TestEntityRelated"
},
{
"id": "24:7776035803207726954",
"name": "RelatedPtr2",
"indexId": "3:6077259218141868916",
"type": 11,
"flags": 8712,
"flags": 520,
"relationTarget": "TestEntityRelated"
},
{
Expand Down Expand Up @@ -332,7 +332,7 @@
"name": "Next",
"indexId": "4:3414034888235702623",
"type": 11,
"flags": 8712,
"flags": 520,
"relationTarget": "EntityByValue"
}
],
Expand All @@ -343,9 +343,47 @@
"targetId": "3:2793387980842421409"
}
]
},
{
"id": "6:2767047163049667536",
"lastPropertyId": "2:180851766275559029",
"name": "TSDate",
"properties": [
{
"id": "1:1462677146136716215",
"name": "Id",
"type": 6,
"flags": 1
},
{
"id": "2:180851766275559029",
"name": "Time",
"type": 10,
"flags": 16384
}
]
},
{
"id": "7:8200223062288330287",
"lastPropertyId": "2:6159670697406080312",
"name": "TSDateNano",
"properties": [
{
"id": "1:7438841713427308701",
"name": "Id",
"type": 6,
"flags": 1
},
{
"id": "2:6159670697406080312",
"name": "Time",
"type": 12,
"flags": 16384
}
]
}
],
"lastEntityId": "5:145948658381494339",
"lastEntityId": "7:8200223062288330287",
"lastIndexId": "4:3414034888235702623",
"lastRelationId": "6:3119566795324383223",
"modelVersion": 5,
Expand Down
31 changes: 31 additions & 0 deletions test/model/timeseries.go
@@ -0,0 +1,31 @@
/*
* Copyright 2018-2021 ObjectBox Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package model

import "time"

//go:generate go run github.com/objectbox/objectbox-go/cmd/objectbox-gogen

type TSDate struct {
Id uint64
Time time.Time `objectbox:"id-companion,date"`
}

type TSDateNano struct {
Id uint64
Time time.Time `objectbox:"id-companion,date-nano"`
}

0 comments on commit 387ac36

Please sign in to comment.