From d28bc8a79c696b9c157071cf7cff9b7ed0816673 Mon Sep 17 00:00:00 2001 From: Jonathan Weiss Date: Thu, 22 Aug 2024 10:42:47 -0700 Subject: [PATCH 1/3] added term as the default equality operator across scalar types --- connector/static_types.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/connector/static_types.go b/connector/static_types.go index e7165a1..be33623 100644 --- a/connector/static_types.go +++ b/connector/static_types.go @@ -307,7 +307,7 @@ func getComparisonOperatorDefinition(dataType string) map[string]schema.Comparis } // if dataType == "date" { // TODO: add back once object types are supported as comparison operators - // requiredObjectTypes["date_range_query"] = objectTypeMap["date_range_query"] + // requiredObjectTypes["date_range_query"] = objectTypeMap["date_range_query"] // comparisonOperators["range"] = schema.NewComparisonOperatorCustom(schema.NewNamedType("date_range_query")).Encode() // } @@ -322,9 +322,7 @@ func getComparisonOperatorDefinition(dataType string) map[string]schema.Comparis comparisonOperators["match_bool_prefix"] = schema.NewComparisonOperatorCustom(schema.NewNamedType(dataType)).Encode() } - if dataType == "_id" { - comparisonOperators["term"] = schema.NewComparisonOperatorEqual().Encode() - } + comparisonOperators["term"] = schema.NewComparisonOperatorEqual().Encode() return comparisonOperators } From b59e78875d1fa229e976b4550965794958cfe0ae Mon Sep 17 00:00:00 2001 From: Jonathan Weiss Date: Thu, 22 Aug 2024 12:29:58 -0700 Subject: [PATCH 2/3] removed _id from uniqueness constraint --- connector/schema.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/connector/schema.go b/connector/schema.go index 65c4d05..5d0d93f 100644 --- a/connector/schema.go +++ b/connector/schema.go @@ -55,11 +55,7 @@ func parseConfigurationToSchema(configuration *types.Configuration, state *types Name: indexName, Arguments: schema.CollectionInfoArguments{}, Type: indexName, - UniquenessConstraints: schema.CollectionInfoUniquenessConstraints{ - indexName + "_by_id": schema.UniquenessConstraint{ - UniqueColumns: []string{"_id"}, - }, - }, + UniquenessConstraints: schema.CollectionInfoUniquenessConstraints{}, ForeignKeys: schema.CollectionInfoForeignKeys{}, }) } From c74fd774cb69106fe61d41fadeb229f48d2507b2 Mon Sep 17 00:00:00 2001 From: Jonathan Weiss Date: Thu, 22 Aug 2024 14:24:28 -0700 Subject: [PATCH 3/3] updated changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ee60ec..7b8ffde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Changed + +- Set term as the default equality operator across scalar types +- Eliminated _id as the default uniqueness constraint + ## [1.0.1] ### Changed