Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 317 for Schemas (0.05 sec)

  1. schema/field_test.go

    }
    
    func TestParseFieldWithPermission(t *testing.T) {
    	user, err := schema.Parse(&UserWithPermissionControl{}, &sync.Map{}, schema.NamingStrategy{})
    	if err != nil {
    		t.Fatalf("Failed to parse user with permission, got error %v", err)
    	}
    
    	fields := []*schema.Field{
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Sat Feb 19 09:02:53 UTC 2022
    - 12.7K bytes
    - Viewed (0)
  2. docs/zh-hant/docs/tutorial/first-steps.md

    ### OpenAPI
    
    **FastAPI** 使用定義 API 的 **OpenAPI** 標準來生成一個 「schema」 與你的所有 API。
    
    #### 「Schema」
    
    「schema」是對某個事物的定義或描述。它並不是實作它的程式碼,而僅僅是一個抽象的描述。
    
    #### API 「schema」
    
    在這種情況下,<a href="https://github.com/OAI/OpenAPI-Specification" class="external-link" target="_blank">OpenAPI</a> 是一個規範,它規定了如何定義 API 的 schema。
    
    這個 schema 定義包含了你的 API 路徑、可能接收的參數等內容。
    
    #### 資料 「schema」
    
    「schema」這個術語也可能指某些資料的結構,比如 JSON 內容的結構。
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Mon Dec 09 12:20:58 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. migrator.go

    }
    
    // TableType table type interface
    type TableType interface {
    	Schema() string
    	Name() string
    	Type() string
    	Comment() (comment string, ok bool)
    }
    
    // Migrator migrator interface
    type Migrator interface {
    	// AutoMigrate
    	AutoMigrate(dst ...interface{}) error
    
    	// Database
    	CurrentDatabase() string
    	FullDataTypeOf(*schema.Field) clause.Expr
    	GetTypeAliases(databaseTypeName string) []string
    
    	// Tables
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  4. soft_delete.go

    		stmt.SetColumn(sd.Field.DBName, curTime, true)
    
    		if stmt.Schema != nil {
    			_, queryValues := schema.GetIdentityFieldValuesMap(stmt.Context, stmt.ReflectValue, stmt.Schema.PrimaryFields)
    			column, values := schema.ToQueryValues(stmt.Table, stmt.Schema.PrimaryFieldDBNames, queryValues)
    
    			if len(values) > 0 {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Feb 01 06:40:55 UTC 2023
    - 4.5K bytes
    - Viewed (1)
  5. docs/id/docs/tutorial/first-steps.md

    #### "schema" Data
    
    Istilah "schema" bisa juga merujuk ke struktur data, seperti konten JSON.
    
    Dalam kondisi ini, ini berarti attribut JSON dan tipe data yang dimiliki, dll.
    
    #### Schema OpenAPI and JSON
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Thu Dec 12 21:46:36 UTC 2024
    - 12K bytes
    - Viewed (0)
  6. tests/table_test.go

    }
    
    type UserWithTableNamer struct {
    	gorm.Model
    	Name string
    }
    
    func (UserWithTableNamer) TableName(namer schema.Namer) string {
    	return namer.TableName("user")
    }
    
    func TestTableWithNamer(t *testing.T) {
    	db, _ := gorm.Open(tests.DummyDialector{}, &gorm.Config{
    		NamingStrategy: schema.NamingStrategy{
    			TablePrefix: "t_",
    		},
    	})
    
    	sql := db.ToSQL(func(tx *gorm.DB) *gorm.DB {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Jul 21 02:46:58 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  7. docs/en/docs/how-to/extending-openapi.md

    {* ../../docs_src/extending_openapi/tutorial001.py hl[22:24] *}
    
    ### Cache the OpenAPI schema { #cache-the-openapi-schema }
    
    You can use the property `.openapi_schema` as a "cache", to store your generated schema.
    
    That way, your application won't have to generate the schema every time a user opens your API docs.
    
    It will be generated only once, and then the same cached schema will be used for the next requests.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  8. tests/serializer_test.go

    	return "hello" + string(es), nil
    }
    
    type CustomSerializer struct {
    	prefix []byte
    }
    
    func NewCustomSerializer(prefix string) *CustomSerializer {
    	return &CustomSerializer{prefix: []byte(prefix)}
    }
    
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Jul 21 02:46:58 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  9. schema/callbacks_test.go

    	"reflect"
    	"sync"
    	"testing"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/schema"
    )
    
    type UserWithCallback struct{}
    
    func (UserWithCallback) BeforeSave(*gorm.DB) error {
    	return nil
    }
    
    func (UserWithCallback) AfterCreate(*gorm.DB) error {
    	return nil
    }
    
    func TestCallback(t *testing.T) {
    	user, err := schema.Parse(&UserWithCallback{}, &sync.Map{}, schema.NamingStrategy{})
    	if err != nil {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 939 bytes
    - Viewed (0)
  10. schema/relationship_test.go

    	syncMap := &sync.Map{}
    	for i := 0; i < 10; i++ {
    		go func() {
    			schema.Parse(&Info1{}, syncMap, schema.NamingStrategy{IdentifierMaxLength: 64})
    		}()
    
    		go func() {
    			schema.Parse(&Info2{}, syncMap, schema.NamingStrategy{IdentifierMaxLength: 64})
    		}()
    
    		go func() {
    			var result User
    			schema.Parse(&result, syncMap, schema.NamingStrategy{IdentifierMaxLength: 64})
    		}()
    		go func() {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Aug 18 11:44:52 UTC 2025
    - 26.5K bytes
    - Viewed (0)
Back to top