{"id":473479,"date":"2025-09-02T16:38:22","date_gmt":"2025-09-02T16:38:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=473479"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=473479","title":{"rendered":"<span>\u041f\u0441\u0438\u0445\u0430\u043d\u0443\u043b \u043d\u0430 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 pgx \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u0412\u0441\u0435 \u043a\u0430\u043a \u043f\u043e \u043a\u0430\u043d\u043e\u043d\u0430\u043c \u0433\u043e\u0448\u043d\u0438\u043a\u043e\u0432 ) \u2014 Golang<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0440\u0435\u0448\u0430\u0435\u0442 pgxWrappy<\/h3>\n<p>\u041a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 Go, \u044f \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b pgx &#8212; \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043b\u0443\u0447\u0448\u0438\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0434\u043b\u044f PostgreSQL. \u041d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u043e\u0442\u043d\u0438\u043c\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0438 \u0434\u0435\u043b\u0430\u043b\u043e \u043a\u043e\u0434 \u043c\u0435\u043d\u0435\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0441 pgx \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430, \u043d\u043e \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<h3>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 pgxWrappy<\/h3>\n<h4>1. \u0418\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432<\/h4>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c Scan():<\/p>\n<pre><code class=\"go\">\/\/ \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e: rows, _ := conn.Query(ctx, \"SELECT id, name FROM users\") defer rows.Close() var users []User for rows.Next() {     var u User     rows.Scan(&amp;u.ID, &amp;u.Name)     users = append(users, u) }  \/\/ \u0414\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a: var users []User db.Select(ctx, &amp;users, \"SELECT id, name FROM users\") <\/code><\/pre>\n<h4>2. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440<\/h4>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439:<\/p>\n<pre><code class=\"go\">type Address struct {     City   string `db:\"city\"`     Street string `db:\"street\"` }  type User struct {     ID      int     `db:\"id\"`     Name    string  `db:\"name\"`     Address Address `db:\"address\"` \/\/ \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b }  \/\/ \u0417\u0430\u043f\u0440\u043e\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u043e\u043b\u044f address_city \u0438 address_street db.Get(ctx, &amp;user, \"SELECT id, name, city as address_city, street as address_street FROM users WHERE id=$1\", 1) <\/code><\/pre>\n<h4>3. \u0413\u0438\u0431\u043a\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439<\/h4>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u0438\u043b\u0438 \u0442\u0435\u0433\u043e\u0432:<\/p>\n<pre><code class=\"go\">type User struct {     UserID  int    `db:\"user_id\"`  \/\/ \u044f\u0432\u043d\u043e\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430     Name    string `db:\"name\"`     \/\/ \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435     Email   string                \/\/ \u0435\u0441\u043b\u0438 \u0442\u0435\u0433 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043c\u044f \u043f\u043e\u043b\u044f \u0432 snake_case     Address Address `db:\"-\"`       \/\/ \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044f \u043f\u0440\u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 } <\/code><\/pre>\n<h4>4. \u041f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438<\/h4>\n<p>\u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"go\">tx, err := db.Begin(ctx) if err != nil {     return err } defer tx.Rollback(ctx)  \/\/ \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043a\u0430\u043a \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c wrapper'\u043e\u043c err = tx.Exec(ctx, \"UPDATE accounts SET balance = balance - $1 WHERE id = $2\", amount, fromID) err = tx.Exec(ctx, \"UPDATE accounts SET balance = balance + $1 WHERE id = $2\", amount, toID)  return tx.Commit(ctx) <\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/h3>\n<p>pgxWrappy \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0447\u0438\u0441\u0442\u044b\u043c pgx. \u0412 \u0442\u0435\u0441\u0442\u0430\u0445 \u043d\u0430 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 10,000 \u0441\u0442\u0440\u043e\u043a \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u043d\u0435\u0435 5%. \u042d\u0442\u043e \u043f\u043b\u0430\u0442\u0430 \u0437\u0430 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043e\u043a\u0443\u043f\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<h3>\u041a\u043e\u0433\u0434\u0430 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c?<\/h3>\n<p>pgxWrappy \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f:<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0433\u0434\u0435 \u0432\u0430\u0436\u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u0442\u0430 \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 domain-\u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0442\u044f\u0442 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c boilerplate-\u043a\u043e\u0434<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0441 database\/sql \u043d\u0430 pgx<\/p>\n<\/li>\n<\/ul>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<pre><code class=\"bash\">go get -u github.com\/Arlandaren\/pgxWrappy <\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"go\">import (     \"context\"     \"github.com\/jackc\/pgx\/v5\/pgxpool\"     \"github.com\/Arlandaren\/pgxWrappy\/pkg\/postgres\" )  func main() {     ctx := context.Background()     pool, _ := pgxpool.New(ctx, \"postgres:\/\/user:pass@localhost:5432\/db\")     db := pgxwrappy.NewWrapper(pool)          \/\/ \u0413\u043e\u0442\u043e\u0432\u043e \u043a \u0440\u0430\u0431\u043e\u0442\u0435! } <\/code><\/pre>\n<h3>\u0421\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e \u0438 \u0432\u043a\u043b\u0430\u0434<\/h3>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u041e\u0442\u0437\u044b\u0432\u044b \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>Bug reports<\/p>\n<\/li>\n<li>\n<p>Pull requests<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u2b50 \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u0437\u0432\u0435\u0437\u0434\u043e\u0439 \u043d\u0430 GitHub: <a href=\"https:\/\/github.com\/Arlandaren\/pgxWrappy\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/Arlandaren\/pgxWrappy<\/a><\/p>\n<h3>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/th>\n<th>\n<p align=\"left\">pgx (\u0447\u0438\u0441\u0442\u044b\u0439)<\/p>\n<\/th>\n<th>\n<p align=\"left\">pgxWrappy<\/p>\n<\/th>\n<th>\n<p align=\"left\">database\/sql<\/p>\n<\/th>\n<th>\n<p align=\"left\">GORM<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0423\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u044b<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0421\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">PostgreSQL \u0444\u0438\u0447\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>pgxWrappy \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u0438\u0448\u0443 \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u0441\u0442\u044b\u043c pgx \u0438 \u0442\u044f\u0436\u0435\u043b\u044b\u043c\u0438 ORM, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044f \u0431\u0430\u043b\u0430\u043d\u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 pgxWrappy \u0432 \u0441\u0432\u043e\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438 \u043e\u0449\u0443\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0443! \u0412\u0430\u0448\u0438 \u0437\u0432\u0451\u0437\u0434\u044b \u0438 \u043e\u0442\u0437\u044b\u0432\u044b \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043b\u0443\u0447\u0448\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e Go-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/931248\/\"> https:\/\/habr.com\/ru\/articles\/931248\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0440\u0435\u0448\u0430\u0435\u0442 pgxWrappy<\/h3>\n<p>\u041a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 Go, \u044f \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b pgx &#8212; \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043b\u0443\u0447\u0448\u0438\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0434\u043b\u044f PostgreSQL. \u041d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u043e\u0442\u043d\u0438\u043c\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0438 \u0434\u0435\u043b\u0430\u043b\u043e \u043a\u043e\u0434 \u043c\u0435\u043d\u0435\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0441 pgx \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430, \u043d\u043e \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<h3>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 pgxWrappy<\/h3>\n<h4>1. \u0418\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432<\/h4>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c Scan():<\/p>\n<pre><code class=\"go\">\/\/ \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e: rows, _ := conn.Query(ctx, \"SELECT id, name FROM users\") defer rows.Close() var users []User for rows.Next() {     var u User     rows.Scan(&amp;u.ID, &amp;u.Name)     users = append(users, u) }  \/\/ \u0414\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a: var users []User db.Select(ctx, &amp;users, \"SELECT id, name FROM users\") <\/code><\/pre>\n<h4>2. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440<\/h4>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439:<\/p>\n<pre><code class=\"go\">type Address struct {     City   string `db:\"city\"`     Street string `db:\"street\"` }  type User struct {     ID      int     `db:\"id\"`     Name    string  `db:\"name\"`     Address Address `db:\"address\"` \/\/ \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b }  \/\/ \u0417\u0430\u043f\u0440\u043e\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u043e\u043b\u044f address_city \u0438 address_street db.Get(ctx, &amp;user, \"SELECT id, name, city as address_city, street as address_street FROM users WHERE id=$1\", 1) <\/code><\/pre>\n<h4>3. \u0413\u0438\u0431\u043a\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439<\/h4>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u0438\u043b\u0438 \u0442\u0435\u0433\u043e\u0432:<\/p>\n<pre><code class=\"go\">type User struct {     UserID  int    `db:\"user_id\"`  \/\/ \u044f\u0432\u043d\u043e\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430     Name    string `db:\"name\"`     \/\/ \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435     Email   string                \/\/ \u0435\u0441\u043b\u0438 \u0442\u0435\u0433 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043c\u044f \u043f\u043e\u043b\u044f \u0432 snake_case     Address Address `db:\"-\"`       \/\/ \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044f \u043f\u0440\u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 } <\/code><\/pre>\n<h4>4. \u041f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438<\/h4>\n<p>\u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"go\">tx, err := db.Begin(ctx) if err != nil {     return err } defer tx.Rollback(ctx)  \/\/ \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043a\u0430\u043a \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c wrapper'\u043e\u043c err = tx.Exec(ctx, \"UPDATE accounts SET balance = balance - $1 WHERE id = $2\", amount, fromID) err = tx.Exec(ctx, \"UPDATE accounts SET balance = balance + $1 WHERE id = $2\", amount, toID)  return tx.Commit(ctx) <\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/h3>\n<p>pgxWrappy \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0447\u0438\u0441\u0442\u044b\u043c pgx. \u0412 \u0442\u0435\u0441\u0442\u0430\u0445 \u043d\u0430 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 10,000 \u0441\u0442\u0440\u043e\u043a \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u043d\u0435\u0435 5%. \u042d\u0442\u043e \u043f\u043b\u0430\u0442\u0430 \u0437\u0430 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043e\u043a\u0443\u043f\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<h3>\u041a\u043e\u0433\u0434\u0430 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c?<\/h3>\n<p>pgxWrappy \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f:<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0433\u0434\u0435 \u0432\u0430\u0436\u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u0442\u0430 \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 domain-\u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0442\u044f\u0442 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c boilerplate-\u043a\u043e\u0434<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0441 database\/sql \u043d\u0430 pgx<\/p>\n<\/li>\n<\/ul>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<pre><code class=\"bash\">go get -u github.com\/Arlandaren\/pgxWrappy <\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"go\">import (     \"context\"     \"github.com\/jackc\/pgx\/v5\/pgxpool\"     \"github.com\/Arlandaren\/pgxWrappy\/pkg\/postgres\" )  func main() {     ctx := context.Background()     pool, _ := pgxpool.New(ctx, \"postgres:\/\/user:pass@localhost:5432\/db\")     db := pgxwrappy.NewWrapper(pool)          \/\/ \u0413\u043e\u0442\u043e\u0432\u043e \u043a \u0440\u0430\u0431\u043e\u0442\u0435! } <\/code><\/pre>\n<h3>\u0421\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e \u0438 \u0432\u043a\u043b\u0430\u0434<\/h3>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u041e\u0442\u0437\u044b\u0432\u044b \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>Bug reports<\/p>\n<\/li>\n<li>\n<p>Pull requests<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u2b50 \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u0437\u0432\u0435\u0437\u0434\u043e\u0439 \u043d\u0430 GitHub: <a href=\"https:\/\/github.com\/Arlandaren\/pgxWrappy\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/Arlandaren\/pgxWrappy<\/a><\/p>\n<h3>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/h3>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/th>\n<th>\n<p align=\"left\">pgx (\u0447\u0438\u0441\u0442\u044b\u0439)<\/p>\n<\/th>\n<th>\n<p align=\"left\">pgxWrappy<\/p>\n<\/th>\n<th>\n<p align=\"left\">database\/sql<\/p>\n<\/th>\n<th>\n<p align=\"left\">GORM<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0423\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u044b<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0421\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">PostgreSQL \u0444\u0438\u0447\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2b50\u2b50<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>pgxWrappy \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u0438\u0448\u0443 \u043c\u0435\u0436\u0434\u0443 \u0447\u0438\u0441\u0442\u044b\u043c pgx \u0438 \u0442\u044f\u0436\u0435\u043b\u044b\u043c\u0438 ORM, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044f \u0431\u0430\u043b\u0430\u043d\u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 pgxWrappy \u0432 \u0441\u0432\u043e\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438 \u043e\u0449\u0443\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0443! \u0412\u0430\u0448\u0438 \u0437\u0432\u0451\u0437\u0434\u044b \u0438 \u043e\u0442\u0437\u044b\u0432\u044b \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043b\u0443\u0447\u0448\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e Go-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/931248\/\"> https:\/\/habr.com\/ru\/articles\/931248\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-473479","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/473479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=473479"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/473479\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=473479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=473479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=473479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}