mirror of
https://github.com/ManyakRus/telegram_loki.git
synced 2024-12-04 21:05:12 +02:00
сделал EscapeString()
This commit is contained in:
parent
335cc3aaa3
commit
8d260a0c16
@ -1 +1 @@
|
|||||||
2024-11-21 07:22:17.547
|
2024-11-21 07:34:31.530
|
@ -1 +1 @@
|
|||||||
00187
|
00188
|
@ -29,7 +29,8 @@ func StartApp() {
|
|||||||
stopapp.StartWaitStop()
|
stopapp.StartWaitStop()
|
||||||
|
|
||||||
if config.Settings.DATABASE_CHECKER_ENABLED == true {
|
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)
|
//telegram_client.Connect(nil)
|
||||||
|
@ -160,13 +160,6 @@ func RunSQL1(Filename string) string {
|
|||||||
Otvet := ""
|
Otvet := ""
|
||||||
var err error
|
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)
|
bytes, err := os.ReadFile(Filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -177,6 +170,12 @@ func RunSQL1(Filename string) string {
|
|||||||
}
|
}
|
||||||
TextSQL := string(bytes)
|
TextSQL := string(bytes)
|
||||||
|
|
||||||
|
//подключимся к БД
|
||||||
|
db := postgres_pgx.GetConnection()
|
||||||
|
ctxMain := contextmain.GetContext()
|
||||||
|
ctx, cancel := context.WithTimeout(ctxMain, 10*time.Minute)
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
//запустим запрос
|
//запустим запрос
|
||||||
ResultSQL := ""
|
ResultSQL := ""
|
||||||
rows := db.QueryRow(ctx, TextSQL)
|
rows := db.QueryRow(ctx, TextSQL)
|
||||||
|
@ -1 +1 @@
|
|||||||
6b38c36 2024-11-15 12:04:47 +0300
|
335cc3a 2024-11-21 10:22:35 +0300
|
||||||
|
Loading…
Reference in New Issue
Block a user