mirror of
https://github.com/ManyakRus/crud_generator.git
synced 2025-01-23 09:24:43 +02:00
сделал model_crud.go_
This commit is contained in:
parent
4667965cb8
commit
77991aad91
@ -109,7 +109,11 @@ func TestFind_ByExtID(t *testing.T) {
|
||||
t.Error("TestFind_ByExtID() error: ", err)
|
||||
}
|
||||
|
||||
Otvet, err = Find_ByExtID(Otvet.ExtID, Otvet.ConnectionID)
|
||||
if Otvet.ExtID ==0 {
|
||||
return
|
||||
}
|
||||
|
||||
err = crud.Find_ByExtID(&Otvet)
|
||||
if err != nil {
|
||||
t.Error("TestFind_ByExtID() error: ", err)
|
||||
}
|
||||
|
@ -135,6 +135,12 @@ func CreateTestFiles(Table1 *types.Table) error {
|
||||
}
|
||||
TextDB = DeleteFuncTestFind_byExtID(TextDB, ModelName, Table1)
|
||||
|
||||
//Postgres_ID_Test = ID Minimum
|
||||
if Table1.IDMinimum != "" {
|
||||
TextFind := "const Postgres_ID_Test = "
|
||||
TextDB = strings.ReplaceAll(TextDB, TextFind+"1", TextFind+Table1.IDMinimum)
|
||||
}
|
||||
|
||||
// замена ID на PrimaryKey
|
||||
TextDB = create_files.ReplacePrimaryKeyID(TextDB, Table1)
|
||||
|
||||
|
@ -120,6 +120,12 @@ func CreateTestFiles(Table1 *types.Table) error {
|
||||
}
|
||||
TextDB = DeleteFuncTestFind_byExtID(TextDB, ModelName, Table1)
|
||||
|
||||
//Postgres_ID_Test = ID Minimum
|
||||
if Table1.IDMinimum != "" {
|
||||
TextFind := "const " + ModelName + "_ID_Test = "
|
||||
TextDB = strings.ReplaceAll(TextDB, TextFind+"1", TextFind+Table1.IDMinimum)
|
||||
}
|
||||
|
||||
// замена ID на PrimaryKey
|
||||
TextDB = create_files.ReplacePrimaryKeyID(TextDB, Table1)
|
||||
|
||||
|
@ -135,6 +135,12 @@ func CreateTestFiles(Table1 *types.Table) error {
|
||||
}
|
||||
TextDB = DeleteFuncTestFind_byExtID(TextDB, ModelName, Table1)
|
||||
|
||||
//Postgres_ID_Test = ID Minimum
|
||||
if Table1.IDMinimum != "" {
|
||||
TextFind := "const Postgres_ID_Test = "
|
||||
TextDB = strings.ReplaceAll(TextDB, TextFind+"1", TextFind+Table1.IDMinimum)
|
||||
}
|
||||
|
||||
// замена ID на PrimaryKey
|
||||
TextDB = create_files.ReplacePrimaryKeyID(TextDB, Table1)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user