src/nopg.js
function pg_create_index_name(self, ObjType, type, field, typefield) {
	var name;
	var colname = _parse_predicate_key(ObjType, {'epoch':false}, field);
	var datakey = colname.getMeta('datakey');
	var field_name = (datakey ? datakey + '.' : '' ) + colname.getMeta('key');
	if( (ObjType === NoPg.Document) && (typefield !== undefined)) {
		if(!typefield) {
			throw new TypeError("No typefield set for NoPg.Document!");
		}
		name = pg_convert_index_name(ObjType.meta.table) + "_" + typefield + "_" + pg_convert_index_name(field_name) + "_index";
	} else {
		name = pg_convert_index_name(ObjType.meta.table) + "_" + pg_convert_index_name(field_name) + "_index";
	}
	return name;
}
function pg_create_index_name(self, ObjType, type, field, typefield) {
	var name;
	var colname = _parse_predicate_key(ObjType, {'epoch':false}, field);
	var datakey = colname.getMeta('datakey');
	var field_name = (datakey ? datakey + '.' : '' ) + colname.getMeta('key');
	if( (ObjType === NoPg.Document) && (typefield !== undefined)) {
		if(!typefield) {
			throw new TypeError("No typefield set for NoPg.Document!");
		}
		name = pg_convert_index_name(ObjType.meta.table) + "_" + typefield + "_" + pg_convert_index_name(field_name) + "_index";
	} else {
		name = pg_convert_index_name(ObjType.meta.table) + "_" + pg_convert_index_name(field_name) + "_index";
	}
	return name;
}
function pg_create_index_name ( self , ObjType , type , field , typefield ) { var name ; var colname = _parse_predicate_key ( ObjType , { 'epoch' : false } , field ) ; var datakey = colname . getMeta ( 'datakey' ) ; var field_name = ( datakey ? datakey + '.' : '' ) + colname . getMeta ( 'key' ) ; if ( ( ObjType === NoPg . Document ) && ( typefield !== undefined ) ) { if ( ! typefield ) { throw new TypeError ( "No typefield set for NoPg.Document!" ) ; } name = pg_convert_index_name ( ObjType . meta . table ) + "_" + typefield + "_" + pg_convert_index_name ( field_name ) + "_index" ; } else { name = pg_convert_index_name ( ObjType . meta . table ) + "_" + pg_convert_index_name ( field_name ) + "_index" ; } return name ; }
Returns index name
@param self
@param ObjType
@param type
@param field
@param typefield
@return {*}
Returns index name