Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 141 - 150 of 1,084 for gorm (0.02 seconds)

  1. logger/logger.go

    package logger
    
    import (
    	"context"
    	"errors"
    	"fmt"
    	"io"
    	"log"
    	"os"
    	"time"
    
    	"gorm.io/gorm/utils"
    )
    
    // ErrRecordNotFound record not found error
    var ErrRecordNotFound = errors.New("record not found")
    
    // Colors
    const (
    	Reset       = "\033[0m"
    	Red         = "\033[31m"
    	Green       = "\033[32m"
    	Yellow      = "\033[33m"
    	Blue        = "\033[34m"
    	Magenta     = "\033[35m"
    	Cyan        = "\033[36m"
    Created: Sun Dec 28 09:35:17 GMT 2025
    - Last Modified: Sun Jan 12 10:19:28 GMT 2025
    - 6.3K bytes
    - Click Count (0)
  2. schema/index.go

    				if field.Name == name {
    					return index
    				}
    			}
    		}
    	}
    
    	return nil
    }
    
    func parseFieldIndexes(field *Field) (indexes []Index, err error) {
    	for _, value := range strings.Split(field.Tag.Get("gorm"), ";") {
    		if value != "" {
    			v := strings.Split(value, ":")
    			k := strings.TrimSpace(strings.ToUpper(v[0]))
    			if k == "INDEX" || k == "UNIQUEINDEX" {
    				var (
    					name       string
    Created: Sun Dec 28 09:35:17 GMT 2025
    - Last Modified: Wed May 21 02:35:56 GMT 2025
    - 3.8K bytes
    - Click Count (0)
  3. tests/associations_has_one_test.go

    package tests_test
    
    import (
    	"testing"
    
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestHasOneAssociation(t *testing.T) {
    	user := *GetUser("hasone", Config{Account: true})
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	CheckUser(t, user, user)
    
    	// Find
    	var user2 User
    	DB.Find(&user2, "id = ?", user.ID)
    	DB.Model(&user2).Association("Account").Find(&user2.Account)
    Created: Sun Dec 28 09:35:17 GMT 2025
    - Last Modified: Wed Jun 12 10:49:45 GMT 2024
    - 7.1K bytes
    - Click Count (0)
  4. tests/lru_test.go

    package tests_test
    
    import (
    	"crypto/rand"
    	"fmt"
    	"math"
    	"math/big"
    	"reflect"
    	"sync"
    	"testing"
    	"time"
    
    	"gorm.io/gorm/internal/lru"
    )
    
    func TestLRU_Add_ExistingKey_UpdatesValueAndExpiresAt(t *testing.T) {
    	lru := lru.NewLRU[string, int](10, nil, time.Hour)
    	lru.Add("key1", 1)
    	lru.Add("key1", 2)
    
    	if value, ok := lru.Get("key1"); !ok || value != 2 {
    Created: Sun Dec 28 09:35:17 GMT 2025
    - Last Modified: Mon Sep 08 09:19:22 GMT 2025
    - 10.4K bytes
    - Click Count (0)
  5. fess-crawler/src/test/resources/ajax/form.html

    FORM...
    Created: Sat Dec 20 11:21:39 GMT 2025
    - Last Modified: Sun Oct 11 02:16:55 GMT 2015
    - 5 bytes
    - Click Count (0)
  6. docs/es/docs/tutorial/request-form-models.md

    Solo necesitas declarar un **modelo de Pydantic** con los campos que quieres recibir como **campos de formulario**, y luego declarar el parámetro como `Form`:
    
    {* ../../docs_src/request_form_models/tutorial001_an_py39.py hl[9:11,15] *}
    
    **FastAPI** **extraerá** los datos de **cada campo** de los **form data** en el request y te dará el modelo de Pydantic que definiste.
    
    ## Revisa la Documentación { #check-the-docs }
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Dec 16 16:33:45 GMT 2025
    - 2.4K bytes
    - Click Count (0)
  7. docs/ru/docs/tutorial/request-form-models.md

    Вы можете проверить это в интерфейсе документации по адресу `/docs`:
    
    <div class="screenshot">
    <img src="/img/tutorial/request-form-models/image01.png">
    </div>
    
    ## Запрет дополнительных полей формы { #forbid-extra-form-fields }
    
    В некоторых случаях (не особо часто встречающихся) вам может понадобиться **ограничить** поля формы только теми, которые объявлены в Pydantic-модели. И **запретить** любые **дополнительные** поля.
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Sep 30 11:24:39 GMT 2025
    - 3.4K bytes
    - Click Count (0)
  8. docs/en/docs/tutorial/request-form-models.md

    <div class="screenshot">
    <img src="/img/tutorial/request-form-models/image01.png">
    </div>
    
    ## Forbid Extra Form Fields { #forbid-extra-form-fields }
    
    In some special use cases (probably not very common), you might want to **restrict** the form fields to only those declared in the Pydantic model. And **forbid** any **extra** fields.
    
    /// note
    
    This is supported since FastAPI version `0.114.0`. 🤓
    
    ///
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sun Aug 31 09:15:41 GMT 2025
    - 2.2K bytes
    - Click Count (0)
  9. docs/de/docs/tutorial/request-form-models.md

    ## Die Dokumentation testen { #check-the-docs }
    
    Sie können dies in der Dokumentations-UI unter `/docs` testen:
    
    <div class="screenshot">
    <img src="/img/tutorial/request-form-models/image01.png">
    </div>
    
    ## Zusätzliche Formularfelder verbieten { #forbid-extra-form-fields }
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Sep 20 15:10:09 GMT 2025
    - 2.7K bytes
    - Click Count (0)
  10. docs/ko/docs/tutorial/request-form-models.md

    ## Pydantic 모델을 사용한 폼
    
    **폼 필드**로 받고 싶은 필드를 **Pydantic 모델**로 선언한 다음, 매개변수를 `Form`으로 선언하면 됩니다:
    
    {* ../../docs_src/request_form_models/tutorial001_an_py39.py hl[9:11,15] *}
    
    **FastAPI**는 요청에서 받은 **폼 데이터**에서 **각 필드**에 대한 데이터를 **추출**하고 정의한 Pydantic 모델을 줍니다.
    
    ## 문서 확인하기
    
    문서 UI `/docs`에서 확인할 수 있습니다:
    
    <div class="screenshot">
    <img src="/img/tutorial/request-form-models/image01.png">
    </div>
    
    ## 추가 폼 필드 금지하기
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Dec 09 12:44:27 GMT 2024
    - 2.3K bytes
    - Click Count (0)
Back to Top