Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for zeroValue (0.17 sec)

  1. soft_delete.go

    	return []clause.Interface{SoftDeleteQueryClause{Field: f, ZeroValue: parseZeroValueTag(f)}}
    }
    
    func parseZeroValueTag(f *schema.Field) sql.NullString {
    	if v, ok := f.TagSettings["ZEROVALUE"]; ok {
    		if _, err := now.Parse(v); err == nil {
    			return sql.NullString{String: v, Valid: true}
    		}
    	}
    	return sql.NullString{Valid: false}
    }
    
    type SoftDeleteQueryClause struct {
    	ZeroValue sql.NullString
    	Field     *schema.Field
    }
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Feb 01 06:40:55 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go

    		reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32,
    		reflect.Float64, reflect.Complex64, reflect.Complex128:
    		return true
    	default:
    		return false
    	}
    }
    
    func zeroValue(value reflect.Value) bool {
    	return reflect.DeepEqual(reflect.Zero(value.Type()).Interface(), value.Interface())
    }
    
    func customMarshalValue(value reflect.Value) (reflect.Value, bool) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 4.9K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/sets/set.go

    	}
    	return res
    }
    
    // PopAny returns a single element from the set.
    func (s Set[T]) PopAny() (T, bool) {
    	for key := range s {
    		s.Delete(key)
    		return key, true
    	}
    	var zeroValue T
    	return zeroValue, false
    }
    
    // Len returns the size of the set.
    func (s Set[T]) Len() int {
    	return len(s)
    }
    
    func less[T cmp.Ordered](lhs, rhs T) bool {
    	return lhs < rhs
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 19:51:18 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  4. tests/soft_delete_test.go

    	}
    }
    
    func TestSoftDeleteZeroValue(t *testing.T) {
    	type SoftDeleteBook struct {
    		ID        uint
    		Name      string
    		Pages     uint
    		DeletedAt gorm.DeletedAt `gorm:"zeroValue:'1970-01-01 00:00:01'"`
    	}
    	DB.Migrator().DropTable(&SoftDeleteBook{})
    	if err := DB.AutoMigrate(&SoftDeleteBook{}); err != nil {
    		t.Fatalf("failed to auto migrate soft delete table")
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Feb 01 06:40:55 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go

    	if offset >= len(src) {
    		return end
    	}
    	if width := bytes.IndexAny(src[offset:], " \n,():;[]+-*"); width > 0 {
    		end = start + token.Pos(width)
    	}
    	return end
    }
    
    func ZeroValue(f *ast.File, pkg *types.Package, typ types.Type) ast.Expr {
    	// TODO(adonovan): think about generics, and also generic aliases.
    	under := aliases.Unalias(typ)
    	// Don't call Underlying unconditionally: although it removes
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  6. src/internal/fuzz/fuzz.go

    	c.warmupInputLeft = c.warmupInputCount
    
    	if len(c.corpus.entries) == 0 {
    		fmt.Fprintf(c.opts.Log, "warning: starting with empty corpus\n")
    		var vals []any
    		for _, t := range opts.Types {
    			vals = append(vals, zeroValue(t))
    		}
    		data := marshalCorpusFile(vals...)
    		h := sha256.Sum256(data)
    		name := fmt.Sprintf("%x", h[:4])
    		c.addCorpusEntries(false, CorpusEntry{Path: name, Data: data})
    	}
    
    	return c, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tfr/python/tfr_gen.py

        if isinstance(node.op, ast.USub):
          zero_value = self._ssa_name('zero')
          ssa_value = self._ssa_name('cst')
          if ty == TFRTypes.I32 or ty == TFRTypes.I64:
            self._emit_with_loc(
                '\n{} = arith.constant 0 : {}'.format(zero_value, ty), node)
            self._emit_with_loc(
                '\n{} = arith.subi {}, {} : {}'.format(ssa_value, zero_value, value,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 27 15:27:03 UTC 2022
    - 55.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/einsum.cc

      Value zero_value = createI32ConstOp(0, loc, rewriter);
      auto concat_out_shape = rewriter->create<TF::ConcatOp>(
          loc,
          RankedTensorType::get({static_cast<int>(bl_index.size()) +
                                 static_cast<int>(r_index.size())},
                                rewriter->getIntegerType(32)),
          zero_value,
          ArrayRef<Value>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.3K bytes
    - Viewed (0)
Back to top