Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for 1dbname (0.16 sec)

  1. callbacks/create.go

    			}
    
    			for _, field := range stmt.Schema.FieldsWithDefaultDBValue {
    				if v, ok := selectColumns[field.DBName]; (ok && v) || (!ok && !restricted) && field.DefaultValueInterface == nil {
    					if rvOfvalue, isZero := field.ValueOf(stmt.Context, stmt.ReflectValue); !isZero {
    						values.Columns = append(values.Columns, clause.Column{Name: field.DBName})
    						values.Values[0] = append(values.Values[0], rvOfvalue)
    					}
    				}
    			}
    		default:
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 08 03:29:55 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  2. callbacks/update.go

    			}
    		}
    
    		if !stmt.SkipHooks && stmt.Schema != nil {
    			for _, dbName := range stmt.Schema.DBNames {
    				field := stmt.Schema.LookUpField(dbName)
    				if field.AutoUpdateTime > 0 && value[field.Name] == nil && value[field.DBName] == nil {
    					if v, ok := selectColumns[field.DBName]; (ok && v) || !ok {
    						now := stmt.DB.NowFunc()
    						assignValue(field, now)
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 05:44:55 GMT 2024
    - 9.4K bytes
    - Viewed (1)
  3. migrator/migrator.go

    				)
    				for _, dbName := range stmt.Schema.DBNames {
    					var foundColumn gorm.ColumnType
    
    					for _, columnType := range columnTypes {
    						if columnType.Name() == dbName {
    							foundColumn = columnType
    							break
    						}
    					}
    
    					if foundColumn == nil {
    						// not found, add column
    						if err = execTx.Migrator().AddColumn(value, dbName); err != nil {
    							return err
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  4. tests/query_test.go

    				t.Run(name, func(t *testing.T) {
    					dbName := DB.NamingStrategy.ColumnName("", name)
    
    					switch name {
    					case "Name":
    						if _, ok := first[dbName].(string); !ok {
    							t.Errorf("invalid data type for %v, got %#v", dbName, first[dbName])
    						}
    					case "Age":
    						if _, ok := first[dbName].(uint); !ok {
    							t.Errorf("invalid data type for %v, got %#v", dbName, first[dbName])
    						}
    					case "Birthday":
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
  5. schema/constraint.go

    }
    
    // ParseUniqueConstraints parse schema unique constraints
    func (schema *Schema) ParseUniqueConstraints() map[string]UniqueConstraint {
    	uniques := make(map[string]UniqueConstraint)
    	for _, field := range schema.Fields {
    		if field.Unique {
    			name := schema.namer.UniqueName(schema.Table, field.DBName)
    			uniques[name] = UniqueConstraint{Name: name, Field: field}
    		}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 07:33:54 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  6. callbacks/preload.go

    				relForeignKeys = append(relForeignKeys, ref.ForeignKey.DBName)
    				relForeignFields = append(relForeignFields, ref.ForeignKey)
    				foreignFields = append(foreignFields, ref.PrimaryKey)
    			} else if ref.PrimaryValue != "" {
    				tx = tx.Where(clause.Eq{Column: ref.ForeignKey.DBName, Value: ref.PrimaryValue})
    			} else {
    				relForeignKeys = append(relForeignKeys, ref.PrimaryKey.DBName)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  7. scan.go

    								rel = rel.FieldSchema.Relationships.Relations[name]
    								relFields = append(relFields, rel.Field)
    							}
    							// lastest name is raw dbname
    							dbName := names[subNameCount-1]
    							if field := rel.FieldSchema.LookUpField(dbName); field != nil && field.Readable {
    								fields[idx] = field
    
    								if len(joinFields) == 0 {
    									joinFields = make([][]*schema.Field, len(columns))
    								}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 09:53:11 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  8. schema/relationship.go

    				relForeignKeys = append(relForeignKeys, ref.ForeignKey.DBName)
    			} else if ref.PrimaryValue != "" {
    				conds = append(conds, clause.Eq{
    					Column: clause.Column{Table: rel.JoinTable.Table, Name: ref.ForeignKey.DBName},
    					Value:  ref.PrimaryValue,
    				})
    			} else {
    				conds = append(conds, clause.Eq{
    					Column: clause.Column{Table: rel.JoinTable.Table, Name: ref.ForeignKey.DBName},
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  9. Jenkinsfile

               }
            }
    
            stage('Build / Unit Test') {
                String jdkName = jenkinsEnv.jdkFromVersion(buildOs, buildJdk)
                String mvnName = jenkinsEnv.mvnFromVersion(buildOs, buildMvn)
                try {
                    withEnv(["JAVA_HOME=${ tool "$jdkName" }",
                             "PATH+MAVEN=${ tool "$jdkName" }/bin:${tool "$mvnName"}/bin",
    Plain Text
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Sun Mar 03 21:28:30 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  10. Jenkinsfile.s390x

            def MAVEN_GOAL='verify'
    
            stage('Build / Unit Test') {
                String jdkName = jenkinsEnv.jdkFromVersion(buildOs, buildJdk)
                String mvnName = jenkinsEnv.mvnFromVersion(buildOs, buildMvn)
                try {
                    withEnv(["JAVA_HOME=${ tool "$jdkName" }",
                             "PATH+MAVEN=${ tool "$jdkName" }/bin:${tool "$mvnName"}/bin",
    Plain Text
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Sun Mar 03 21:28:30 GMT 2024
    - 7.7K bytes
    - Viewed (0)
Back to top