- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 64 for uniqBy (0.14 sec)
-
migrator/index.go
// PrimaryKey returns the index is primary key or not. func (idx Index) PrimaryKey() (isPrimaryKey bool, ok bool) { return idx.PrimaryKeyValue.Bool, idx.PrimaryKeyValue.Valid } // Unique returns whether the index is unique or not. func (idx Index) Unique() (unique bool, ok bool) { return idx.UniqueValue.Bool, idx.UniqueValue.Valid } // Option return the optional attribute of the index func (idx Index) Option() string {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Apr 11 02:32:46 GMT 2023 - 1023 bytes - Viewed (0) -
migrator/migrator.go
unique, ok := columnType.Unique() if !ok || field.PrimaryKey { return nil // skip primary key } // By default, ColumnType's Unique is not affected by UniqueIndex, so we don't care about UniqueIndex. return m.RunWithValue(value, func(stmt *gorm.Statement) error { // We're currently only receiving boolean values on `Unique` tag, // so the UniqueConstraint name is fixed
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 07:15:49 GMT 2024 - 29K bytes - Viewed (0) -
tests/hooks_test.go
DB.Migrator().DropTable(&Product{}) DB.AutoMigrate(&Product{}) p := Product{Code: "unique_code", Price: 100} DB.Save(&p) if !reflect.DeepEqual(p.GetCallTimes(), []int64{1, 1, 0, 1, 1, 0, 0, 0, 0}) { t.Fatalf("Callbacks should be invoked successfully, %v", p.GetCallTimes()) } DB.Where("Code = ?", "unique_code").First(&p) if !reflect.DeepEqual(p.GetCallTimes(), []int64{1, 1, 0, 1, 0, 0, 0, 0, 1}) {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Feb 18 01:20:29 GMT 2023 - 15.9K bytes - Viewed (0) -
internal/crypto/doc.go
// with customer provided keys (SSE-C). // // All objects are encrypted with an unique and randomly generated 'ObjectKey'. // The ObjectKey itself is never stored in plaintext. Instead it is only stored // in a sealed from. The sealed 'ObjectKey' is created by encrypting the 'ObjectKey' // with an unique key-encryption-key. Given the correct key-encryption-key the
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Aug 26 19:52:29 GMT 2022 - 5K bytes - Viewed (0) -
tests/postgres_test.go
SomeID string OtherID string Data string } DB.Migrator().DropTable(&Thing{}) DB.Migrator().CreateTable(&Thing{}) if err := DB.Exec("ALTER TABLE things ADD CONSTRAINT some_id_other_id_unique UNIQUE (some_id, other_id)").Error; err != nil { t.Error(err) } thing := Thing{ SomeID: "1234", OtherID: "1234", Data: "something", } DB.Create(&thing) thing2 := Thing{
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Oct 08 09:16:32 GMT 2022 - 6.4K bytes - Viewed (3) -
internal/crypto/key.go
"github.com/minio/sio" ) // ObjectKey is a 256 bit secret key used to encrypt the object. // It must never be stored in plaintext. type ObjectKey [32]byte // GenerateKey generates a unique ObjectKey from a 256 bit external key // and a source of randomness. If random is nil the default PRNG of the // system (crypto/rand) is used. func GenerateKey(extKey []byte, random io.Reader) (key ObjectKey) {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Mar 19 20:28:10 GMT 2024 - 6.4K bytes - Viewed (0) -
schema/naming.go
} // IndexName generate index name func (ns NamingStrategy) IndexName(table, column string) string { return ns.formatName("idx", table, ns.toDBName(column)) } // UniqueName generate unique constraint name func (ns NamingStrategy) UniqueName(table, column string) string { return ns.formatName("uni", table, ns.toDBName(column)) } func (ns NamingStrategy) formatName(prefix, table, name string) string {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Oct 30 09:15:49 GMT 2023 - 5.2K bytes - Viewed (0) -
schema/schema_helper_test.go
} else { tests.AssertObjEqual(t, parsedField, f, "Name", "DBName", "BindNames", "DataType", "PrimaryKey", "AutoIncrement", "Creatable", "Updatable", "Readable", "HasDefaultValue", "DefaultValue", "NotNull", "Unique", "Comment", "Size", "Precision", "TagSettings") if f.DBName != "" { if field, ok := s.FieldsByDBName[f.DBName]; !ok || parsedField != field { t.Errorf("schema %v failed to look up field with dbname %v", s, f.DBName)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Dec 15 08:31:23 GMT 2023 - 7.5K bytes - Viewed (0) -
operator/cmd/mesh/manifest_shared_test.go
// istioctl install cmdApply cmdType = "istioctl install" // in-cluster controller cmdController cmdType = "operator controller" ) // Golden output files add a lot of noise to pull requests. Use a unique suffix so // we can hide them by default. This should match one of the `linuguist-generated=true` // lines in istio.io/istio/.gitattributes. const ( goldenFileSuffixHideChangesInReview = ".golden.yaml"
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Tue Feb 20 22:39:28 GMT 2024 - 11.7K bytes - Viewed (1) -
cmd/metrics-resource.go
// retrieved from a peer, along with errors if any type PeerResourceMetrics struct { Metrics map[MetricSubsystem]ResourceMetrics Errors []string } // ResourceMetrics is a map of unique key identifying // a resource metric (e.g. reads_per_sec_{node}_{drive}) // to its data type ResourceMetrics map[string]ResourceMetric // ResourceMetric represents a single resource metric
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Apr 23 23:56:12 GMT 2024 - 17.4K bytes - Viewed (0)