pow/pow.js
function queryBitsValueByCycleIndex( oConn, uCycleIndex, pfnCallback )
{
	if ( ! oConn )
	{
		return pfnCallback( `call queryBitsValueByCycleIndex with invalid oConn` );
	}
	if ( 'number' !== typeof uCycleIndex || uCycleIndex <= 0 )
	{
		return pfnCallback( `call queryBitsValueByCycleIndex with invalid uCycleIndex` );
	}

	oConn.query
	(
		"SELECT bits \
		FROM round_cycle \
		WHERE cycle_id = ?",
		[
			_round.getCycleIdByRoundIndex( uCycleIndex )
		],
		function( arrRows )
		{
			if ( 0 === arrRows.length )
			{
				return pfnCallback( `bits not found in table [round_cycle].` );
			}

			return pfnCallback( null, parseInt( arrRows[ 0 ][ 'bits' ] ) );
		}
	);
}
function queryBitsValueByCycleIndex( oConn, uCycleIndex, pfnCallback )
{
	if ( ! oConn )
	{
		return pfnCallback( `call queryBitsValueByCycleIndex with invalid oConn` );
	}
	if ( 'number' !== typeof uCycleIndex || uCycleIndex <= 0 )
	{
		return pfnCallback( `call queryBitsValueByCycleIndex with invalid uCycleIndex` );
	}

	oConn.query
	(
		"SELECT bits \
		FROM round_cycle \
		WHERE cycle_id = ?",
		[
			_round.getCycleIdByRoundIndex( uCycleIndex )
		],
		function( arrRows )
		{
			if ( 0 === arrRows.length )
			{
				return pfnCallback( `bits not found in table [round_cycle].` );
			}

			return pfnCallback( null, parseInt( arrRows[ 0 ][ 'bits' ] ) );
		}
	);
}
function queryBitsValueByCycleIndex ( oConn , uCycleIndex , pfnCallback ) { if ( ! oConn ) { return pfnCallback ( ` ` ) ; } if ( 'number' !== typeof uCycleIndex || uCycleIndex <= 0 ) { return pfnCallback ( ` ` ) ; } oConn . query ( "SELECT bits \
		FROM round_cycle \
		WHERE cycle_id = ?" , [ _round . getCycleIdByRoundIndex ( uCycleIndex ) ] , function ( arrRows ) { if ( 0 === arrRows . length ) { return pfnCallback ( ` ` ) ; } return pfnCallback ( null , parseInt ( arrRows [ 0 ] [ 'bits' ] ) ) ; } ) ; }
query bits value by round index from database

@param	{handle}	oConn
@param	{function}	oConn.query
@param	{number}	uCycleIndex
@param	{function}	pfnCallback( err, nBitsValue )
query bits value by round index from database