{"action":"created","issue":{"url":"https://api.github.com/repos/dashiwa/drupal8/issues/1","repository_url":"https://api.github.com/repos/dashiwa/drupal8","labels_url":"https://api.github.com/repos/dashiwa/drupal8/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/dashiwa/drupal8/issues/1/comments","events_url":"https://api.github.com/repos/dashiwa/drupal8/issues/1/events","html_url":"https://github.com/dashiwa/drupal8/issues/1","id":380532412,"node_id":"MDU6SXNzdWUzODA1MzI0MTI=","number":1,"title":"Database API","user":{"login":"dashiwa","id":1746232,"node_id":"MDQ6VXNlcjE3NDYyMzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1746232?v=4","gravatar_id":"","url":"https://api.github.com/users/dashiwa","html_url":"https://github.com/dashiwa","followers_url":"https://api.github.com/users/dashiwa/followers","following_url":"https://api.github.com/users/dashiwa/following{/other_user}","gists_url":"https://api.github.com/users/dashiwa/gists{/gist_id}","starred_url":"https://api.github.com/users/dashiwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dashiwa/subscriptions","organizations_url":"https://api.github.com/users/dashiwa/orgs","repos_url":"https://api.github.com/users/dashiwa/repos","events_url":"https://api.github.com/users/dashiwa/events{/privacy}","received_events_url":"https://api.github.com/users/dashiwa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-11-14T04:36:30Z","updated_at":"2018-11-14T05:46:47Z","closed_at":null,"author_association":"OWNER","body":"https://www.drupal.org/docs/8/api/database-api/instantiating-a-connection-object\r\n\r\nhttps://www.drupal.org/docs/8/api/database-api/database-configuration\"\r\n\r\nhttps://www.drupal.org/docs/8/api/database-api/static-queries\r\n\r\nhttps://www.drupal.org/docs/8/api/database-api/dynamic-queries\r\n\r\nhttps://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Database%21database.api.php/function/hook_query_TAG_alter/8.6.x\r\n\r\nhttps://www.drupal.org/docs/7/api/database-api/dynamic-queries/query-alteration-tagging\r\n\r\nhttps://www.drupal.org/docs/8/api/database-api/merge-queries\r\n\r\nhttps://www.drupal.org/docs/8/api/database-api/transactions\r\n\r\n\"https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Database%21database.api.php/group/schemaapi/8.6.x\r\n\r\nhttps://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension%21module.api.php/function/hook_install/8.6.x\r\n\r\nhttps://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension%21module.api.php/function/hook_uninstall/8.6.x"},"comment":{"url":"https://api.github.com/repos/dashiwa/drupal8/issues/comments/438545637","html_url":"https://github.com/dashiwa/drupal8/issues/1#issuecomment-438545637","issue_url":"https://api.github.com/repos/dashiwa/drupal8/issues/1","id":438545637,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODU0NTYzNw==","user":{"login":"dashiwa","id":1746232,"node_id":"MDQ6VXNlcjE3NDYyMzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1746232?v=4","gravatar_id":"","url":"https://api.github.com/users/dashiwa","html_url":"https://github.com/dashiwa","followers_url":"https://api.github.com/users/dashiwa/followers","following_url":"https://api.github.com/users/dashiwa/following{/other_user}","gists_url":"https://api.github.com/users/dashiwa/gists{/gist_id}","starred_url":"https://api.github.com/users/dashiwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dashiwa/subscriptions","organizations_url":"https://api.github.com/users/dashiwa/orgs","repos_url":"https://api.github.com/users/dashiwa/repos","events_url":"https://api.github.com/users/dashiwa/events{/privacy}","received_events_url":"https://api.github.com/users/dashiwa/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T05:46:47Z","updated_at":"2018-11-14T05:46:47Z","author_association":"OWNER","body":"**Статические запросы**\r\n\r\n```\r\n$connection = \\Drupal::database();\r\n$query = $connection->query(\"SELECT id, example FROM {mytable}\");\r\n$result = $query->fetchAll();\r\n```\r\n\r\nМетод объекта подключения принимает три аргумента:query()\r\n\r\n$ query : запрос для запуска. При необходимости используйте заполнители и обозначьте все имена таблиц с фигурными фигурными скобками.\r\n$ args : массив замещающих значений для замены в запросе. \r\n$ options : массив параметров для управления работой запроса (необязательно).\r\n\r\n**Placeholders** \r\n\r\n```\r\n$query = $connection->query(\"SELECT id, example FROM {mytable} WHERE created > :created\", [\r\n  ':created' => REQUEST_TIME - 3600,\r\n]);\r\n```"}}
{"actor":{"display_login":"dashiwa"}}