{"id":406314,"date":"2024-06-29T18:51:41","date_gmt":"2024-06-29T18:51:41","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=406314"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=406314","title":{"rendered":"<span>\u0427\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0432 SQLite 3.37<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 <a href=\"https:\/\/habr.com\/ru\/news\/t\/545310\/\">3.35<\/a>, \u0440\u0435\u043b\u0438\u0437 3.37 \u043f\u0440\u0438\u043d\u0435\u0441 \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u041d\u043e \u0441\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u2014 \u043e\u0434\u043d\u043e \u0438\u0437 \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0445 \u0437\u0430 \u0432\u0441\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e: \u00ab\u0441\u0442\u0440\u043e\u0433\u0438\u0439\u00bb \u0440\u0435\u0436\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u0432\u0438\u0436\u043e\u043a \u0441\u043b\u0435\u0434\u0438\u0442, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0442\u0438\u043f\u0443.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0442\u0435\u043f\u0435\u0440\u044c SQLite \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0443\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u00ab\u0434\u0436\u0430\u0432\u0430\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0432 \u043c\u0438\u0440\u0435 \u0421\u0423\u0411\u0414\u00bb \u30c4 \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"problema-s-tipami\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0442\u0438\u043f\u0430\u043c\u0438<\/h2>\n<p>  <\/p>\n<p>SQLite \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 5 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>INTEGER<\/code> \u2014 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430,<\/li>\n<li><code>REAL<\/code> \u2014 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430,<\/li>\n<li><code>TEXT<\/code> \u2014 \u0441\u0442\u0440\u043e\u043a\u0438,<\/li>\n<li><code>BLOB<\/code> \u2014 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435,<\/li>\n<li><code>NULL<\/code> \u2014 \u043f\u0443\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u043e, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0421\u0423\u0411\u0414, SQLite \u043c\u043e\u0436\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u2014\u00a0\u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0430.<\/p>\n<p>  <\/p>\n<blockquote><p>SQLite \u0445\u0440\u0430\u043d\u0438\u0442 \u0442\u0438\u043f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u0435, \u043d\u043e \u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432. \u0422\u0438\u043f \u043d\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f: \u043f\u0440\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 SQLite \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u043e\u043c\u0443 \u0442\u0438\u043f\u0443, \u043d\u043e \u0435\u0441\u043b\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u2014 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u00ab\u043a\u0430\u043a \u0435\u0441\u0442\u044c\u00bb.<\/p><\/blockquote>\n<p>\u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u043c\u043e\u0436\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0441\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c, \u0430 \u043f\u043e\u0442\u043e\u043c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 SQL \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u041b\u044e\u0431\u0430\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u0421\u0423\u0411\u0414 \u0432\u044b\u0434\u0430\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0440\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0435 \u0438 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442 \u00ab\u0448\u0435\u0440\u0441\u0442\u0438\u0442\u044c\u00bb \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p>  <\/p>\n<p>\u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u2014\u00a0\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u0448\u043a\u0432\u0430\u043b \u043a\u0440\u0438\u0442\u0438\u043a\u0438 \u0432 \u0430\u0434\u0440\u0435\u0441 SQLite: \u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u043f\u043e\u043d\u0430\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0431\u0430\u0437\u0443 \u0442\u0430\u043a\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u043e\u0442\u043e\u043c \u0432\u043e\u0432\u0435\u043a \u043d\u0435 \u0440\u0430\u0437\u0433\u0440\u0435\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<p>\u0418 \u0432\u043e\u0442, \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 3.37 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0435\u043d\u0430!<\/p>\n<p>  <\/p>\n<h2 id=\"strict-tablicy\">STRICT-\u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/h2>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u00ab\u0441\u0442\u0440\u043e\u0433\u043e\u0439\u00bb, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0442\u0441\u0435\u0431\u044f\u0442\u0438\u043d\u0443 \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"sql\">create table employees (     id integer primary key,     name text,     salary integer ) STRICT;<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"sql\">insert into employees (id, name, salary) values (22, '\u041a\u0441\u0435\u043d\u0438\u044f', 'hello'); -- Error: stepping, cannot store TEXT value in INTEGER column employees.salary (19)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423 \u041a\u0441\u0435\u043d\u0438\u0438 \u044f\u0432\u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0437\u0430\u0440\u043f\u043b\u0430\u0442\u043e\u0439, \u043d\u0430 \u0447\u0442\u043e \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 SQLite. \u041a\u0442\u043e-\u0442\u043e \u0436\u0434\u0430\u043b \u044d\u0442\u043e\u0433\u043e \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044c \u043b\u0435\u0442 \u30c4<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0432\u0438\u0436\u043e\u043a \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a \u0442\u0438\u043f\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u0438 \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u2014\u00a0\u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"sql\">insert into employees (id, name, salary) values (22, '\u041a\u0441\u0435\u043d\u0438\u044f', '85');  select * from employees; \u250c\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502 id \u2502  name  \u2502 salary \u2502 \u251c\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524 \u2502 22 \u2502 \u041a\u0441\u0435\u043d\u0438\u044f \u2502 85     \u2502 \u2514\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/code><\/pre>\n<p>  <\/p>\n<p>\u2192 \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f: <a href=\"https:\/\/sqlite.org\/stricttables.html\" rel=\"nofollow noopener noreferrer\">STRICT Tables<\/a><\/p>\n<p>  <\/p>\n<h2 id=\"novyy-tip-dannyh--any\">\u041d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 ANY<\/h2>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432 STRICT-\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0442\u043e \u0434\u0443\u0448\u0435 \u0443\u0433\u043e\u0434\u043d\u043e, \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f <code>ANY<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"sql\">create table employees (     id integer primary key,     name text,     stuff any ) strict;  insert into employees (id, name, stuff) values (21, '\u0415\u043b\u0435\u043d\u0430', 84), (22, '\u041a\u0441\u0435\u043d\u0438\u044f', 'hello'), (23, '\u041b\u0435\u043e\u043d\u0438\u0434', randomblob(8));  select id, name, typeof(stuff) from employees; \u250c\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502 id \u2502  name  \u2502 typeof(stuff) \u2502 \u251c\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524 \u2502 21 \u2502 \u0415\u043b\u0435\u043d\u0430  \u2502 integer       \u2502 \u2502 22 \u2502 \u041a\u0441\u0435\u043d\u0438\u044f \u2502 text          \u2502 \u2502 23 \u2502 \u041b\u0435\u043e\u043d\u0438\u0434 \u2502 blob          \u2502 \u2514\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/code><\/pre>\n<p>  <\/p>\n<p>STRICT-\u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 ANY-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439. \u0412 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 ANY \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0442\u0430\u043a \u0436\u0435, \u043d\u043e \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0447\u0438\u0441\u043b\u0430.<\/p>\n<p>  <\/p>\n<p>\u2192 \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f: <a href=\"https:\/\/sqlite.org\/stricttables.html#the_any_datatype\" rel=\"nofollow noopener noreferrer\">The ANY datatype<\/a><\/p>\n<p>  <\/p>\n<h2 id=\"pragma-komanda-table_list\">\u041f\u0440\u0430\u0433\u043c\u0430-\u043a\u043e\u043c\u0430\u043d\u0434\u0430 table_list<\/h2>\n<p>  <\/p>\n<p>\u041d\u043e\u0432\u0430\u044f \u043f\u0440\u0430\u0433\u043c\u0430 <code>table_list<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0432\u044c\u044e\u0445 \u0432 \u0431\u0430\u0437\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"sql\">pragma table_list; \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502 schema \u2502        name        \u2502 type  \u2502 ncol \u2502 wr \u2502 strict \u2502 \u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524 \u2502 main   \u2502 expenses           \u2502 table \u2502 4    \u2502 0  \u2502 0      \u2502 \u2502 main   \u2502 employees          \u2502 table \u2502 5    \u2502 0  \u2502 0      \u2502 \u2502 main   \u2502 sqlite_schema      \u2502 table \u2502 5    \u2502 0  \u2502 0      \u2502 \u2502 temp   \u2502 sqlite_temp_schema \u2502 table \u2502 5    \u2502 0  \u2502 0      \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u043d\u044c\u0448\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 <code>sqlite_schema<\/code>. \u0421 \u043f\u0440\u0430\u0433\u043c\u043e\u0439 \u0443\u0434\u043e\u0431\u043d\u0435\u0435.<\/p>\n<p>  <\/p>\n<p>\u2192 \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f: <a href=\"https:\/\/sqlite.org\/pragma.html#pragma_table_list\" rel=\"nofollow noopener noreferrer\">PRAGMA table_list<\/a><\/p>\n<p>  <\/p>\n<h2 id=\"izmeneniya-v-cli\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 CLI<\/h2>\n<p>  <\/p>\n<p>\u0412 CLI-\u0443\u0442\u0438\u043b\u0438\u0442\u0435 (<code>sqlite.exe<\/code>) \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u043e\u0442-\u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>.connection<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">sqlite> .connection ACTIVE 0: :memory:<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">sqlite> .open employees.ru.db sqlite> .connection ACTIVE 0: employees.ru.db<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">sqlite> .connection 1 sqlite> .open employees.en.db sqlite> .connection        0: employees.ru.db ACTIVE 1: employees.en.db<\/code><\/pre>\n<p>  <\/p>\n<p>\u2192 \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f: <a href=\"https:\/\/sqlite.org\/cli.html#dotconn\" rel=\"nofollow noopener noreferrer\">Working With Multiple Database Connections<\/a><\/p>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043e\u043f\u0446\u0438\u044e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 <code>--safe<\/code>. \u041e\u043d\u0430 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0433\u0434\u0435-\u043b\u0438\u0431\u043e \u043a\u0440\u043e\u043c\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0430\u0437\u044b. \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 <code>.open<\/code>, <code>.shell<\/code>, <code>.import<\/code> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u00ab\u043e\u043f\u0430\u0441\u043d\u044b\u0435\u00bb \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<p>  <\/p>\n<p>\u2192 \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f: <a href=\"https:\/\/sqlite.org\/cli.html#safemode\" rel=\"nofollow noopener noreferrer\">The &#8212;safe command-line option<\/a><\/p>\n<p>  <\/p>\n<h2 id=\"i-esche-neskolko-melochey\">\u0418 \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u043b\u043e\u0447\u0435\u0439<\/h2>\n<p>  <\/p>\n<ul>\n<li>\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 <code>order by<\/code> \u043d\u0430 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442 \u043e\u0431\u0449\u0443\u044e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/li>\n<li>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>generate_series(start, stop, step)<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>start<\/code> (<code>stop<\/code> \u0438 <code>step<\/code> \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438).<\/li>\n<li>\u041f\u0430\u0447\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 C API.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c, \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u043b\u0438\u0437! \u0421\u0442\u0440\u043e\u0433\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0434\u043e\u043b\u0433\u043e\u0436\u0434\u0430\u043d\u043d\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 \u0433\u0438\u0431\u043a\u0438\u043c \u0442\u0438\u043f\u0430\u043c, <code>any<\/code> \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u0443 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u044f\u0432\u043d\u043e\u0439, \u0430 \u043f\u0440\u0430\u0433\u043c\u0430 <code>table_list<\/code> \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u0430.<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/sqlite.org\/releaselog\/3_37_0.html\" rel=\"nofollow noopener noreferrer\">\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0442\u043a\u0438 \u043a \u0440\u0435\u043b\u0438\u0437\u0443<\/a> | <a href=\"https:\/\/sqlite.org\/download.html\" rel=\"nofollow noopener noreferrer\">\u0421\u043a\u0430\u0447\u0430\u0442\u044c<\/a><\/p>\n<p>  <\/p>\n<p><em>\u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SQLite \u0432 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043a\u0430\u043d\u0430\u043b <strong><a href=\"https:\/\/t.me\/sqliter\" rel=\"nofollow noopener noreferrer\">@sqliter<\/a><\/strong><\/em><\/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\/592085\/\"> https:\/\/habr.com\/ru\/articles\/592085\/<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 <a href=\"https:\/\/habr.com\/ru\/news\/t\/545310\/\">3.35<\/a>, \u0440\u0435\u043b\u0438\u0437 3.37 \u043f\u0440\u0438\u043d\u0435\u0441 \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u041d\u043e \u0441\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u2014 \u043e\u0434\u043d\u043e \u0438\u0437 \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0445 \u0437\u0430 \u0432\u0441\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e: \u00ab\u0441\u0442\u0440\u043e\u0433\u0438\u0439\u00bb \u0440\u0435\u0436\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u0432\u0438\u0436\u043e\u043a \u0441\u043b\u0435\u0434\u0438\u0442, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0442\u0438\u043f\u0443.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0442\u0435\u043f\u0435\u0440\u044c SQLite \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0443\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u00ab\u0434\u0436\u0430\u0432\u0430\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0432 \u043c\u0438\u0440\u0435 \u0421\u0423\u0411\u0414\u00bb \u30c4 \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/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-406314","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/406314","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=406314"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/406314\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=406314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=406314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=406314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}