Skip to content

error handling: Query does not return error #2

@ikrammert

Description

@ikrammert

Hi,
When creating a database or table, it does not return an error if it already exists, but it prints a debug on the terminal.
the example code:

db, err := chdb.NewSession("a") //path is option
	if err != nil {
		fmt.Println("hata", err)
		return
	}
	fmt.Print("\nburası\n")

	a := db.Query("CREATE DATABASE db")
	fmt.Println("a değeri",a)

	db.Query("USE db")

the terminal:

burası
Code: 82. DB::Exception: Database db already exists. (DATABASE_ALREADY_EXISTS)
a değeri 

Does anyone have any solution suggestions?
Thank you, happy new year

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions