{"id":1553,"date":"2023-03-29T17:12:53","date_gmt":"2023-03-29T09:12:53","guid":{"rendered":"http:\/\/175.24.184.226\/?p=1553"},"modified":"2023-08-10T16:52:46","modified_gmt":"2023-08-10T08:52:46","slug":"peewee-%e5%8f%8d%e5%90%91%e7%94%9f%e6%88%90model","status":"publish","type":"post","link":"\/?p=1553","title":{"rendered":"peewee \u53cd\u5411\u751f\u6210model"},"content":{"rendered":"<pre><code class=\"language-bash\">(spider) [rhino@rhino014 lxc]$ python -m pwiz -h\nUsage: pwiz.py [options] database_name\n\nOptions:\n  -h, --help            show this help message and exit\n  -H HOST, --host=HOST\n  -p PORT, --port=PORT\n  -u USER, --user=USER\n  -P, --password\n  -e ENGINE, --engine=ENGINE\n                        Database type, e.g. sqlite, mysql, postgresql or\n                        cockroachdb. Default is &quot;postgresql&quot;.\n  -s SCHEMA, --schema=SCHEMA\n  -t TABLES, --tables=TABLES\n                        Only generate the specified tables. Multiple table\n                        names should be separated by commas.\n  -v, --views           Generate model classes for VIEWs in addition to\n                        tables.\n  -i, --info            Add database information and other metadata to top of\n                        the generated file.\n  -o, --preserve-order  Model definition column ordering matches source table.\n  -I, --ignore-unknown  Ignore fields whose type cannot be determined.\n  -L, --legacy-naming   Use legacy table- and column-name generation.<\/code><\/pre>\n<p>\u6ce8\u610f\u8981\u70b9\uff1a<\/p>\n<ul>\n<li>\u4e0d\u5e26\u53c2\u6570e\uff0c\u9ed8\u8ba4\u4e3a<code>postgresql<\/code>\uff1b<\/li>\n<li>\u586b\u5199<code>host<\/code>\u7684\u65f6\u5019\uff0c\u5f97\u662f\u5927\u5199H\u54e6\uff0c\u4e25\u683c\u6309\u7167help\u7684\u63d0\u793a\u6765\uff1b<\/li>\n<li>\u76f4\u63a5\u8fd0\u884c\u65f6\u6253\u5370\u5230\u63a7\u5236\u53f0\uff0c\u5199\u5230\u6587\u4ef6\u9700\u8981 <code>... &gt; filename.py<\/code><\/li>\n<\/ul>\n<p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<pre><code class=\"language-shell\">python -m pwiz  -H 192.168.0.14 -p5432 -u postgres -P password -s important_events enterprise_open_information_mobile &gt; filename.py<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>(spider) [rhino@rhino014 lxc]$ python -m pwiz -h Usage: pwiz.py [opt   \u2026 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[186],"tags":[135,16],"_links":{"self":[{"href":"\/index.php?rest_route=\/wp\/v2\/posts\/1553"}],"collection":[{"href":"\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1553"}],"version-history":[{"count":2,"href":"\/index.php?rest_route=\/wp\/v2\/posts\/1553\/revisions"}],"predecessor-version":[{"id":1555,"href":"\/index.php?rest_route=\/wp\/v2\/posts\/1553\/revisions\/1555"}],"wp:attachment":[{"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1553"},{"taxonomy":"post_tag","embeddable":true,"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}