Changeset 2432883
- Timestamp:
- 12/07/2020 06:44:13 AM (5 years ago)
- Location:
- beyond-wpdb
- Files:
-
- 6 edited
- 6 copied
-
tags/2.0.1 (copied) (copied from beyond-wpdb/trunk)
-
tags/2.0.1/beyond-wpdb.php (copied) (copied from beyond-wpdb/trunk/beyond-wpdb.php) (1 diff)
-
tags/2.0.1/class (copied) (copied from beyond-wpdb/trunk/class)
-
tags/2.0.1/class/admin-ajax.php (modified) (1 diff)
-
tags/2.0.1/js (copied) (copied from beyond-wpdb/trunk/js)
-
tags/2.0.1/js/beyond-wpdb.js (modified) (7 diffs)
-
tags/2.0.1/lang (copied) (copied from beyond-wpdb/trunk/lang)
-
tags/2.0.1/readme.txt (copied) (copied from beyond-wpdb/trunk/readme.txt) (3 diffs)
-
trunk/beyond-wpdb.php (modified) (1 diff)
-
trunk/class/admin-ajax.php (modified) (1 diff)
-
trunk/js/beyond-wpdb.js (modified) (7 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
beyond-wpdb/tags/2.0.1/beyond-wpdb.php
r2432881 r2432883 4 4 Plugin URI: 5 5 Description: Speed up your WordPress database by making use of JSON type columns in MySQL. 6 Version: 2.0. 06 Version: 2.0.1 7 7 Author: PRESSMAN 8 8 Author URI: https://www.pressman.ne.jp/ -
beyond-wpdb/tags/2.0.1/class/admin-ajax.php
r2352101 r2432883 27 27 $handle = 'beyond-wpdb-script'; 28 28 29 wp_enqueue_script( 'axios', 'https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js', array(), '', true );30 29 wp_enqueue_script( $handle, plugin_dir_url( __FILE__ ) . '../js/beyond-wpdb.js', array('jquery'), '1.0', true ); 31 30 // Localizing constants. -
beyond-wpdb/tags/2.0.1/js/beyond-wpdb.js
r2352101 r2432883 9 9 * @returns {Promise<*>} 10 10 */ 11 getExistJsonTablesApi : async() =>{11 getExistJsonTablesApi() { 12 12 const formData = new FormData(); 13 13 formData.append( 'action', BEYOND_WPDB_CONFIG.exist_tables.get.action ); 14 14 formData.append( 'nonce', BEYOND_WPDB_CONFIG.exist_tables.get.nonce ); 15 15 16 return await axios.post( BEYOND_WPDB_CONFIG.api, formData ) 17 .catch( ( err ) => err.response ); 16 return BEYOND_WPDB.api( formData ); 18 17 }, 19 18 … … 23 22 * @returns {Promise<*>} 24 23 */ 25 getExistVirtualColumnsApi : async() =>{24 getExistVirtualColumnsApi() { 26 25 const formData = new FormData(); 27 26 formData.append( 'action', BEYOND_WPDB_CONFIG.virtual_columns.get.action ); 28 27 formData.append( 'nonce', BEYOND_WPDB_CONFIG.virtual_columns.get.nonce ); 29 28 30 return await axios 31 .post( BEYOND_WPDB_CONFIG.api, formData ) 32 .catch( ( err ) => err.response ); 33 }, 34 createVirtualColumnsApi: async( primary, columns ) => { 29 return BEYOND_WPDB.api( formData ); 30 }, 31 createVirtualColumnsApi( primary, columns ) { 35 32 const formData = new FormData(); 36 33 formData.append( 'action', BEYOND_WPDB_CONFIG.virtual_columns.create.action ); … … 39 36 formData.append( 'columns', columns ); 40 37 41 return await axios 42 .post( BEYOND_WPDB_CONFIG.api, formData ) 43 .catch( ( err ) => err.response ); 38 return BEYOND_WPDB.api( formData ); 44 39 }, 45 40 … … 50 45 * @returns {Promise<*>} 51 46 */ 52 activateActionApi : async( primary ) =>{47 activateActionApi( primary ) { 53 48 const formData = new FormData(); 54 49 formData.append( 'action', BEYOND_WPDB_CONFIG.data_init.create.action ); … … 56 51 formData.append( 'primary', primary ); 57 52 58 return await axios 59 .post( BEYOND_WPDB_CONFIG.api, formData ) 60 .catch( ( err ) => err.response ); 53 return BEYOND_WPDB.api( formData ); 61 54 }, 62 55 … … 67 60 * @returns {Promise<*>} 68 61 */ 69 deactivateActionApi : async( primary ) =>{62 deactivateActionApi( primary ) { 70 63 const formData = new FormData(); 71 64 formData.append( 'action', BEYOND_WPDB_CONFIG.data_init.delete.action ); … … 73 66 formData.append( 'primary', primary ); 74 67 75 return await axios 76 .post( BEYOND_WPDB_CONFIG.api, formData ) 77 .catch( ( err ) => err.response ); 68 return BEYOND_WPDB.api( formData ); 69 }, 70 71 /** 72 * send api 73 * 74 * @param formData 75 * @returns {Promise<*>} 76 */ 77 api( formData ) { 78 return new Promise(function(resolve, reject) { 79 jQuery.ajax({ 80 url: BEYOND_WPDB_CONFIG.api, 81 type: "POST", 82 async: true, 83 contentType: false, 84 processData: false, 85 data: formData, 86 dataType: "json", 87 }).then( 88 function (result, status, jqXHR) { 89 const re = { 90 data: result, 91 status: jqXHR.status 92 }; 93 resolve(re); 94 }, 95 function () { 96 reject(); 97 } 98 ) 99 }); 78 100 }, 79 101 -
beyond-wpdb/tags/2.0.1/readme.txt
r2432881 r2432883 2 2 Contributors: pressmaninc,kazunao,hiroshisekiguchi,hommakoharu,pmhirotaka 3 3 Tags: pressman,pressmaninc,json,meta_query,wpdb,database,fast,speed,speed up,sql,replace sql 4 Stable tag: 2.0. 04 Stable tag: 2.0.1 5 5 License: GPLv2 or later 6 6 License URI: http://www.gnu.org/licenses/gpl-2.0.html 7 Requires Wordpress: 5. 47 Requires Wordpress: 5.5.3 8 8 Requires PHP: 7.0 9 9 Requires MySQL: 5.7 10 10 Requires MariaDB: 10.2 11 Tested up to: 5. 411 Tested up to: 5.5.3 12 12 13 13 ※ Table names have been changed since v2.0.Please delete the meta_json table and reactivate it in the options screen. … … 38 38 == Custom meta tables generated by plugin == 39 39 The actual table names are prefixed with $table_prefix. 40 41 40 * postmeta_beyond (for posts table) 42 41 * usermeta_beyond (for users table) … … 45 44 == Columns in each table == 46 45 The actual table names are prefixed with $table_prefix. 47 48 46 * postmeta_beyond 49 47 * post_id(int) -
beyond-wpdb/trunk/beyond-wpdb.php
r2352101 r2432883 4 4 Plugin URI: 5 5 Description: Speed up your WordPress database by making use of JSON type columns in MySQL. 6 Version: 2.0. 06 Version: 2.0.1 7 7 Author: PRESSMAN 8 8 Author URI: https://www.pressman.ne.jp/ -
beyond-wpdb/trunk/class/admin-ajax.php
r2352101 r2432883 27 27 $handle = 'beyond-wpdb-script'; 28 28 29 wp_enqueue_script( 'axios', 'https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js', array(), '', true );30 29 wp_enqueue_script( $handle, plugin_dir_url( __FILE__ ) . '../js/beyond-wpdb.js', array('jquery'), '1.0', true ); 31 30 // Localizing constants. -
beyond-wpdb/trunk/js/beyond-wpdb.js
r2352101 r2432883 9 9 * @returns {Promise<*>} 10 10 */ 11 getExistJsonTablesApi : async() =>{11 getExistJsonTablesApi() { 12 12 const formData = new FormData(); 13 13 formData.append( 'action', BEYOND_WPDB_CONFIG.exist_tables.get.action ); 14 14 formData.append( 'nonce', BEYOND_WPDB_CONFIG.exist_tables.get.nonce ); 15 15 16 return await axios.post( BEYOND_WPDB_CONFIG.api, formData ) 17 .catch( ( err ) => err.response ); 16 return BEYOND_WPDB.api( formData ); 18 17 }, 19 18 … … 23 22 * @returns {Promise<*>} 24 23 */ 25 getExistVirtualColumnsApi : async() =>{24 getExistVirtualColumnsApi() { 26 25 const formData = new FormData(); 27 26 formData.append( 'action', BEYOND_WPDB_CONFIG.virtual_columns.get.action ); 28 27 formData.append( 'nonce', BEYOND_WPDB_CONFIG.virtual_columns.get.nonce ); 29 28 30 return await axios 31 .post( BEYOND_WPDB_CONFIG.api, formData ) 32 .catch( ( err ) => err.response ); 33 }, 34 createVirtualColumnsApi: async( primary, columns ) => { 29 return BEYOND_WPDB.api( formData ); 30 }, 31 createVirtualColumnsApi( primary, columns ) { 35 32 const formData = new FormData(); 36 33 formData.append( 'action', BEYOND_WPDB_CONFIG.virtual_columns.create.action ); … … 39 36 formData.append( 'columns', columns ); 40 37 41 return await axios 42 .post( BEYOND_WPDB_CONFIG.api, formData ) 43 .catch( ( err ) => err.response ); 38 return BEYOND_WPDB.api( formData ); 44 39 }, 45 40 … … 50 45 * @returns {Promise<*>} 51 46 */ 52 activateActionApi : async( primary ) =>{47 activateActionApi( primary ) { 53 48 const formData = new FormData(); 54 49 formData.append( 'action', BEYOND_WPDB_CONFIG.data_init.create.action ); … … 56 51 formData.append( 'primary', primary ); 57 52 58 return await axios 59 .post( BEYOND_WPDB_CONFIG.api, formData ) 60 .catch( ( err ) => err.response ); 53 return BEYOND_WPDB.api( formData ); 61 54 }, 62 55 … … 67 60 * @returns {Promise<*>} 68 61 */ 69 deactivateActionApi : async( primary ) =>{62 deactivateActionApi( primary ) { 70 63 const formData = new FormData(); 71 64 formData.append( 'action', BEYOND_WPDB_CONFIG.data_init.delete.action ); … … 73 66 formData.append( 'primary', primary ); 74 67 75 return await axios 76 .post( BEYOND_WPDB_CONFIG.api, formData ) 77 .catch( ( err ) => err.response ); 68 return BEYOND_WPDB.api( formData ); 69 }, 70 71 /** 72 * send api 73 * 74 * @param formData 75 * @returns {Promise<*>} 76 */ 77 api( formData ) { 78 return new Promise(function(resolve, reject) { 79 jQuery.ajax({ 80 url: BEYOND_WPDB_CONFIG.api, 81 type: "POST", 82 async: true, 83 contentType: false, 84 processData: false, 85 data: formData, 86 dataType: "json", 87 }).then( 88 function (result, status, jqXHR) { 89 const re = { 90 data: result, 91 status: jqXHR.status 92 }; 93 resolve(re); 94 }, 95 function () { 96 reject(); 97 } 98 ) 99 }); 78 100 }, 79 101 -
beyond-wpdb/trunk/readme.txt
r2352165 r2432883 2 2 Contributors: pressmaninc,kazunao,hiroshisekiguchi,hommakoharu,pmhirotaka 3 3 Tags: pressman,pressmaninc,json,meta_query,wpdb,database,fast,speed,speed up,sql,replace sql 4 Stable tag: 2.0. 04 Stable tag: 2.0.1 5 5 License: GPLv2 or later 6 6 License URI: http://www.gnu.org/licenses/gpl-2.0.html 7 Requires Wordpress: 5. 47 Requires Wordpress: 5.5.3 8 8 Requires PHP: 7.0 9 9 Requires MySQL: 5.7 10 10 Requires MariaDB: 10.2 11 Tested up to: 5. 411 Tested up to: 5.5.3 12 12 13 13 ※ Table names have been changed since v2.0.Please delete the meta_json table and reactivate it in the options screen. … … 38 38 == Custom meta tables generated by plugin == 39 39 The actual table names are prefixed with $table_prefix. 40 41 40 * postmeta_beyond (for posts table) 42 41 * usermeta_beyond (for users table) … … 45 44 == Columns in each table == 46 45 The actual table names are prefixed with $table_prefix. 47 48 46 * postmeta_beyond 49 47 * post_id(int)
Note: See TracChangeset
for help on using the changeset viewer.