CyberX

mobile

RevolveR DBX: ABQ JOIN support

Hi, all. Today I was integrate new DBX core into RevolveR CMS for some tests thats represent new JOIN queries syntax support. Today all RevolveR CMS DB core works under ABQ(array based queries).

Now in work cache for JOIN queries but seems all engine works fine.

For example I have to show how to perform INNER JOIN under DBX. First, we have to define DB table fields structure. For emaple I define two tables:

$STRUCT_NODES = [
	'field_id' => [
		'type'   => 'num', // int
		'auto'   => true,  // auto increment
		'length' => 255,
		'value'  => 0
	],
	'field_title' => [
		'type'   => 'text', // varchar
		'length' => 50,
		'fill'   => true
	],
	'field_content' => [
		'type'   => 'text', // varchar
		'length' => 10000,
		'fill'   => true
	],
	'field_description' => [
		'type'   => 'text', // varchar
		'length' => 10000,
		'fill'   => true
	],
	'field_user' => [
		'type'   => 'text',
		'length' => 50,
		'fill'	 => true
	],
	'field_time' => [
		'type'   => 'text',
		'length' => 50,
		'fill'	 => true
	],
	'field_route' => [
		'type'   => 'text',
		'length' => 100,
		'fill'	 => true
	],
	'field_category' => [
		'type'   => 'num',
		'length' => 100,
		'fill'	 => true
	],
	'field_published' => [
		'type'   => 'num',
		'length' => 1,
		'fill'   => false
	]
];

$STRUCT_COMMENTS = [
	'field_id' => [
		'type'   => 'num', // int
		'auto'   => true,  // auto increment
		'length' => 255,
		'value'  => 0
	],
	'field_node_id' => [
		'type'   => 'num',
		'length' => 50,
		'fill'	 => true
	],
	'field_user_id' => [
		'type'   => 'num',
		'length' => 50,
		'fill'	 => true
	],
	'field_user_name' => [
		'type'   => 'text',
		'length' => 100,
		'fill'	 => true
	],
	'field_content' => [
		'type'   => 'text', // varchar
		'length' => 10000,
		'fill'   => true
	],
	'field_time' => [
		'type'   => 'text',
		'length' => 100,
		'fill'	 => true
	],
	'field_published' => [
		'type' 	 => 'num',
		'length' => 1,
		'fill'	 => false
	]
];

Next, we have to configure querie:

	$cFields = ['field_id', 'field_node_id', 'field_user_id', 'field_user_name', 'field_content', 'field_time', 'field_published'];
	$nFields = ['field_id', 'field_title', 'field_content', 'field_description', 'field_user', 'field_time', 'field_route', 'field_category', 'field_published'];

	$nFields['field_id']['criterion_field'] = 'field_id';
	$nFields['field_id']['linked_field'] = 'field_node_id';

	$ncFields = [
		$cFields,
		$nFields
	];

Next, we have to perform query using syntax below:

	unset( $dbx::$result['result'] ); // clean previous result


	$dbx::query('j', ['revolver__nodes', 'revolver__comments'], $ncFields);

DBX automatically configure next SQL syntax:

SELECT `revolver__nodes`.*, `revolver__comments`.* FROM `revolver__nodes` INNER JOIN `revolver__comments` ON(`revolver__nodes`.field_id=`revolver__comments`.field_node_id);

DBX version 1.1.3 avalible on GitHub.

RevolveR CMS v.1.3.8 update

I was done testing new caches released in DBX engine and fix some bugs in RevolveR CMS.

For now MySQL queries cache by default segmented into parts via chunks to improve performance and memory usage.

Added new jump to top animated button into core template, fixed AMP links issue and added some security additions in .htaccess.

RevolveR CMS
RevolveR CMS

RevolveR CMS v.1.3.8 update availible on GitHub.

How to make simple scroll top jumper via RevolveR

So. This is a small tutorial how to create simple animated scroll to top button via RevolveR frontend library. Example you can see on this site when you scroll window. When scroll position takes 40% of Y axis the jumper are shown with animation.

Code below creates this scroll to top JavaScript animated button:


// charging weapons with namespace
const revolver = new Revolver('$');

$.dom('.jumper', 'del');

// jumper
$.dom('div',"new|after|body", {
	html: '<i  style="display: block;position: relative;top: 20px;color: #fff; font-size: 25px; text-shadow: -1px -1px 2px #000">^</i>', 
	attr: { 
		style: "width:60px; height:60px; text-align:center; display:block; position: fixed;bottom: 30px;right: 30px;background: rgba(0,0,0,.5);",
	class: "jumper"
		} 
	}
);

	$.event('.jumper', 'click', function(e) {

		e.preventDefault();

		$.scroll();

	});

	window.addEventListener('scroll', function(e) {

		if( $.curOffset[1] <= $.sizes[1] * 0.4 ) {

			$.dom('.jumper', 'animate', ['opacity:0:500'], function(e) {
				$.dom('.jumper i', 'animate', ['top:-50px:300:pulse'], function(e) {
					$.dom(".jumper", "style", ['display:none']);
				});
			});


		} 
		else {

			$.dom(".jumper", "style", ['display:block']);
			$.dom('.jumper', 'animate', ['opacity:.9:500'], function(e) {
				$.dom('.jumper i', 'animate', ['top:20px:300:pulse'], function(e) {});
			});
			
		}

	});

RevolveR DBX v1.1.2:: implement cache partitions

Yo. Today I release new version of RevolveR DBX engine thats supports for now cache segments based on static partitions in JSON format. You can configure how many chunks will be used to split static caches. If rows count are around 0-2000 per table you can adjust $sql_cache_segments value to zero. Also you can configure cache segments for 5 to default for many rows count.

DBX ABQ JSON Cache
DBX ABQ JSON Cache

Cache partitions updates automatically after every database change such as delete, insert, update, inject queries.

Now RevolveR DBX under testing and I need some time to update RevolveR CMS code.

Acer Nitro 5 AN515-42 BIOS v.1.1.2 update

Today I was check for updates windows 10 and find new firmware update from Insyde Corporation for my Acer Nitro 5. Perhaps windows now updates BIOS automatically without any third party software.

UEFI BIOS firmware device in Windows 10
UEFI BIOS firmware device in Windows 10

For installing the software need reboot and pluged in power adapter. In devices section after update we can see new device named firmware.