- Sort Score
- Result 10 results
- Languages All
Results 11 - 18 of 18 for TableName (0.21 sec)
-
cni/pkg/plugin/plugin_dryrun_test.go
// If table is not empty, get table name from the first line lines := strings.Split(strings.Trim(table, "\n"), "\n") if len(lines) >= 1 && strings.HasPrefix(lines[0], "* ") { tableName := lines[0][2:] lines = append(lines, "COMMIT") tables[tableName] = strings.Join(lines, "\n") } } return tables } func refreshGoldens(t *testing.T, goldenFileName string, generatedRules map[string]string) {
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Sat Feb 10 00:31:55 GMT 2024 - 8.4K bytes - Viewed (0) -
schema/schema_test.go
checkSchemaField(t, user, &fields[i], func(f *schema.Field) { f.Creatable = true f.Updatable = true f.Readable = true }) } } type CustomizeTable struct{} func (CustomizeTable) TableName() string { return "customize" } func TestCustomizeTableName(t *testing.T) { customize, err := schema.Parse(&CustomizeTable{}, &sync.Map{}, schema.NamingStrategy{}) if err != nil {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Dec 15 08:31:23 GMT 2023 - 12.9K bytes - Viewed (0) -
tests/serializer_test.go
CustomSerializerString string `gorm:"serializer:custom"` EncryptedString EncryptedString } func (*SerializerPostgresStruct) TableName() string { return "serializer_structs" } func adaptorSerializerModel(s *SerializerStruct) interface{} { if DB.Dialector.Name() == "postgres" { sps := SerializerPostgresStruct(*s) return &sps } return s }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 21 14:09:38 GMT 2023 - 7.6K bytes - Viewed (0) -
schema/schema_helper_test.go
} if r.JoinTable.Table != relation.JoinTable.Table { t.Errorf("schema %v relation's join table tablename expects %v, but got %v", s, relation.JoinTable.Table, r.JoinTable.Table) } for i := range relation.JoinTable.Fields { checkSchemaField(t, r.JoinTable, &relation.JoinTable.Fields[i], nil) } }
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) -
schema/relationship_test.go
}) } type Author struct { gorm.Model } type Book struct { gorm.Model Author Author AuthorID uint } func (Book) TableName() string { return "my_schema.a_very_very_very_very_very_very_very_very_long_table_name" } func TestParseConstraintNameWithSchemaQualifiedLongTableName(t *testing.T) { s, err := schema.Parse( &Book{},
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 25.5K bytes - Viewed (0) -
docs/zh/docs/tutorial/sql-databases.md
从`database`(来自上面的`database.py`文件)导入`Base`。 创建从它继承的类。 这些类就是 SQLAlchemy 模型。 ```Python hl_lines="4 7-8 18-19" {!../../../docs_src/sql_databases/sql_app/models.py!} ``` 这个`__tablename__`属性是用来告诉 SQLAlchemy 要在数据库中为每个模型使用的数据库表的名称。 ### 创建模型属性/列 现在创建所有模型(类)属性。 这些属性中的每一个都代表其相应数据库表中的一列。 我们使用`Column`来表示 SQLAlchemy 中的默认值。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 27K bytes - Viewed (0) -
docs/en/docs/tutorial/sql-databases.md
Create classes that inherit from it. These classes are the SQLAlchemy models. ```Python hl_lines="4 7-8 18-19" {!../../../docs_src/sql_databases/sql_app/models.py!} ``` The `__tablename__` attribute tells SQLAlchemy the name of the table to use in the database for each of these models. ### Create model attributes/columns Now create all the model (class) attributes.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 29.6K bytes - Viewed (0) -
docs/em/docs/tutorial/sql-databases.md
🗄 `Base` ⚪️➡️ `database` (📁 `database.py` ⚪️➡️ 🔛). ✍ 🎓 👈 😖 ⚪️➡️ ⚫️. 👫 🎓 🇸🇲 🏷. ```Python hl_lines="4 7-8 18-19" {!../../../docs_src/sql_databases/sql_app/models.py!} ``` `__tablename__` 🔢 💬 🇸🇲 📛 🏓 ⚙️ 💽 🔠 👫 🏷. ### ✍ 🏷 🔢/🏓 🔜 ✍ 🌐 🏷 (🎓) 🔢. 🔠 👫 🔢 🎨 🏓 🚮 🔗 💽 🏓. 👥 ⚙️ `Column` ⚪️➡️ 🇸🇲 🔢 💲.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 25.2K bytes - Viewed (1)