1
0
mirror of https://github.com/ManyakRus/telegram_loki.git synced 2024-12-03 08:55:23 +02:00

сделал EscapeString()

This commit is contained in:
Nikitin Aleksandr 2024-11-21 10:35:03 +03:00
parent 335cc3aaa3
commit 8d260a0c16
5 changed files with 11 additions and 11 deletions

View File

@ -1 +1 @@
2024-11-21 07:22:17.547
2024-11-21 07:34:31.530

View File

@ -1 +1 @@
00187
00188

View File

@ -29,7 +29,8 @@ func StartApp() {
stopapp.StartWaitStop()
if config.Settings.DATABASE_CHECKER_ENABLED == true {
postgres_pgx.Start(constants.SERVICE_NAME)
postgres_pgx.GetConnection_WithApplicationName(constants.SERVICE_NAME)
defer postgres_pgx.CloseConnection()
}
//telegram_client.Connect(nil)

View File

@ -160,13 +160,6 @@ func RunSQL1(Filename string) string {
Otvet := ""
var err error
//подключимся к БД
db := postgres_pgx.GetConnection()
ctxMain := contextmain.GetContext()
ctx, cancel := context.WithTimeout(ctxMain, 10*time.Minute)
defer cancel()
//прочитаем файл
bytes, err := os.ReadFile(Filename)
if err != nil {
@ -177,6 +170,12 @@ func RunSQL1(Filename string) string {
}
TextSQL := string(bytes)
//подключимся к БД
db := postgres_pgx.GetConnection()
ctxMain := contextmain.GetContext()
ctx, cancel := context.WithTimeout(ctxMain, 10*time.Minute)
defer cancel()
//запустим запрос
ResultSQL := ""
rows := db.QueryRow(ctx, TextSQL)

View File

@ -1 +1 @@
6b38c36 2024-11-15 12:04:47 +0300
335cc3a 2024-11-21 10:22:35 +0300