Loading...
Loading...
Compare original and translation side by side
execute_commandexecute_command<system_info>sqlitepostgresqlSQLite (/config/db/moviepilot.db)PostgreSQL (user:password@host:port/database)<system_info>sqlitepostgresqlSQLite (/config/db/moviepilot.db)PostgreSQL (user:password@host:port/database)<system_info>SQLiteexecute_commandsqlite3 -header -column <DB_PATH> "YOUR SQL QUERY HERE;"sqlite3 -json <DB_PATH> "YOUR SQL QUERY HERE;"sqlite3 -header -column <DB_PATH> "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;"sqlite3 <DB_PATH> ".schema tablename"SQLiteexecute_commandsqlite3 -header -column <DB_PATH> "YOUR SQL QUERY HERE;"sqlite3 -json <DB_PATH> "YOUR SQL QUERY HERE;"sqlite3 -header -column <DB_PATH> "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;"sqlite3 <DB_PATH> ".schema tablename"<system_info>user:password@host:port/databasePostgreSQLexecute_commandpsqlPGPASSWORD=<password> psql -h <host> -p <port> -U <user> -d <database> -c "YOUR SQL QUERY HERE;"PGPASSWORD=<password> psql -h <host> -p <port> -U <user> -d <database> -c "SELECT tablename FROM pg_tables WHERE schemaname='public' ORDER BY tablename;"PGPASSWORD=<password> psql -h <host> -p <port> -U <user> -d <database> -c "\d tablename"PostgreSQLuser:password@host:port/databaseexecute_commandpsqlPGPASSWORD=<password> psql -h <host> -p <port> -U <user> -d <database> -c "YOUR SQL QUERY HERE;"PGPASSWORD=<password> psql -h <host> -p <port> -U <user> -d <database> -c "SELECT tablename FROM pg_tables WHERE schemaname='public' ORDER BY tablename;"PGPASSWORD=<password> psql -h <host> -p <port> -U <user> -d <database> -c "\d tablename"idpathtypetitleyeartmdbidimdbiddoubanidseasonsepisodesdownloaderdownload_hashtorrent_nametorrent_siteuseridusernamedatemedia_categoryidpathtypetitleyeartmdbidimdbiddoubanidseasonsepisodesdownloaderdownload_hashtorrent_nametorrent_siteuseridusernamedatemedia_categoryiddownloaderdownload_hashfullpathsavepathfilepathtorrentnamestateiddownloaderdownload_hashfullpathsavepathfilepathtorrentnamestateidsrcdestmodetypecategorytitleyeartmdbidseasonsepisodesdownload_hashstatuserrmsgdateidsrcdestmodetypecategorytitleyeartmdbidseasonsepisodesdownload_hashstatuserrmsgdateidnameyeartypetmdbiddoubanidseasontotal_episodestart_episodelack_episodestatefilterincludeexcludequalityresolutionsitesbest_versiondateusernameidnameyeartypetmdbiddoubanidseasontotal_episodestart_episodelack_episodestatefilterincludeexcludequalityresolutionsitesbest_versiondateusernameidnameyeartypetmdbiddoubanidseasontotal_episodestart_episodedateusernameidnameyeartypetmdbiddoubanidseasontotal_episodestart_episodedateusernameidnameemailis_activeis_superuserpermissionssettingsidnameemailis_activeis_superuserpermissionssettingsidnamedomainurlpricookieproxyis_activedownloaderlimit_intervallimit_countidnamedomainurlpricookieproxyis_activedownloaderlimit_intervallimit_countiddomainnameusernameuser_levelbonusuploaddownloadratioseedingleechingseeding_sizeupdated_dayiddomainnameusernameuser_levelbonusuploaddownloadratioseedingleechingseeding_sizeupdated_dayiddomainsuccessfailsecondslst_statelst_mod_dateiddomainsuccessfailsecondslst_statelst_mod_dateidserverlibraryitem_iditem_typetitleoriginal_titleyeartmdbidimdbidtvdbidpathidserverlibraryitem_iditem_typetitleoriginal_titleyeartmdbidimdbidtvdbidpathidkeyvalueidkeyvalueidusernamekeyvalueidusernamekeyvalueidplugin_idkeyvalueidplugin_idkeyvalueidchannelsourcemtypetitletextimagelinkuseridreg_timeidchannelsourcemtypetitletextimagelinkuseridreg_timeidnamedescriptiontimertrigger_typeevent_typestaterun_countactionsflowslast_timeidnamedescriptiontimertrigger_typeevent_typestaterun_countactionsflowslast_timeiduser_idcredential_idpublic_keynamecreated_atlast_used_atis_activeiduser_idcredential_idpublic_keynamecreated_atlast_used_atis_activeidnamedomainurlbase64idnamedomainurlbase64SELECT COUNT(*) AS total FROM downloadhistory;SELECT COUNT(*) AS total FROM downloadhistory;SELECT title, year, type, torrent_site, date FROM downloadhistory ORDER BY id DESC LIMIT 10;SELECT title, year, type, torrent_site, date FROM downloadhistory ORDER BY id DESC LIMIT 10;SELECT id, title, src, errmsg, date FROM transferhistory WHERE status = 0 ORDER BY id DESC LIMIT 10;SELECT id, title, src, errmsg, date FROM transferhistory WHERE status = 0 ORDER BY id DESC LIMIT 10;SELECT name, year, type, season, state, lack_episode FROM subscribe WHERE state = 'R';SELECT name, year, type, season, state, lack_episode FROM subscribe WHERE state = 'R';SELECT name, domain, upload, download, ratio, bonus, seeding, user_level FROM siteuserdata ORDER BY upload DESC;SELECT name, domain, upload, download, ratio, bonus, seeding, user_level FROM siteuserdata ORDER BY upload DESC;SELECT server, library, COUNT(*) AS count FROM mediaserveritem GROUP BY server, library;SELECT server, library, COUNT(*) AS count FROM mediaserveritem GROUP BY server, library;SELECT domain, success, fail, ROUND(success * 100.0 / (success + fail), 1) AS success_rate FROM sitestatistic WHERE success + fail > 0 ORDER BY success_rate DESC;SELECT domain, success, fail, ROUND(success * 100.0 / (success + fail), 1) AS success_rate FROM sitestatistic WHERE success + fail > 0 ORDER BY success_rate DESC;SELECT plugin_id, key FROM plugindata ORDER BY plugin_id, key;SELECT plugin_id, key FROM plugindata ORDER BY plugin_id, key;DELETE FROM downloadhistory WHERE date < '2024-01-01';DELETE FROM downloadhistory WHERE date < '2024-01-01';UPDATE subscribe SET state = 'S' WHERE id = 123;UPDATE subscribe SET state = 'S' WHERE id = 123;DELETE FROM transferhistory WHERE status = 0 AND date < '2024-06-01';DELETE FROM transferhistory WHERE status = 0 AND date < '2024-06-01';INSERTUPDATEDELETEDROPALTERTRUNCATESELECTDELETEDROPTRUNCATE.dumppg_dumpUPDATEDELETEWHERESELECTLIMITsitecookieapikeytoken'***'userhashed_passwordotp_secretINSERTUPDATEDELETEDROPALTERTRUNCATESELECTDELETEDROPTRUNCATE.dumppg_dumpWHEREUPDATEDELETESELECTLIMITsitecookieapikeytoken'***'userhashed_passwordotp_secret| Feature | SQLite | PostgreSQL |
|---|---|---|
| Boolean values | | |
| String concat | | |
| Current time | | |
| LIMIT syntax | | |
| JSON access | | |
| Case sensitivity | Case-insensitive by default | Case-sensitive |
| LIKE | Case-insensitive | Use |
| 特性 | SQLite | PostgreSQL |
|---|---|---|
| 布尔值 | | |
| 字符串拼接 | ` | |
| 当前时间 | | |
| LIMIT语法 | | |
| JSON访问 | | |
| 大小写敏感性 | 默认不区分大小写 | 区分大小写 |
| LIKE | 不区分大小写 | 使用 |
sqlite3python3 -c "import sqlite3; ..."psqlpython3 -c "import psycopg2; ..."sqlite3python3 -c "import sqlite3; ..."psqlpython3 -c "import psycopg2; ..."