<commit_before><?php
/**
 * @package Core
 * @subpackage model.filters
 */ 
class categoryFilter extends baseObjectFilter
{
	const FREE_TEXT_FIELDS = 'name,tags,description';
	
	public function init ()
	{
		// TODO - should separate the schema of the fields from the actual values
		// or can use this to set default valuse
		$this->fields = kArray::makeAssociativeDefaultValue ( array (
			"_eq_id",
			"_in_id",
			"_eq_parent_id",
			"_in_parent_id",
			"_eq_full_name",
			"_likex_full_name",
			"_in_full_name",
			"_eq_depth",
			"_gte_created_at",
			"_lte_created_at",
			"_free_text",
			"_in_members",
			"_gte_updated_at",
			"_lte_updated_at",
			"_like_tags",
			"_mlikeor_tags",
			"_mlikeand_tags",
			"_eq_appear_in_list",
			"_eq_privacy",
			"_in_privacy",
			"_eq_inheritance_type",
			"_in_inheritance_type",
			"_eq_status",
			"_in_status",
			"_gte_partner_sort_value",
			"_lte_partner_sort_value",
			"_likex_full_name",
			"_eq_full_ids",
			"_likex_full_ids",
			) , NULL );

		$this->allowed_order_fields = array ( "created_at" , "updated_at", "full_ids", "depth", "partner_sort_value", "entries_count", "members_count", "direct_entries_count");

		$this->aliases = array ( 
			"owner" => "kuser_id"
		);
	}

	public function describe() 
	{
		return 
			array (
				"display_name" => "CategoryFilter",
				"desc" => ""
			);
	}
	
	// TODO - move to base class, all that should stay here is the peer class, not the logic of the field translation !
	// The base class should invoke $peek_class::translateFieldName( $field_name , BasePeer::TYPE_FIELDNAME , BasePeer::TYPE_COLNAME );
	public function getFieldNameFromPeer ( $field_name )
	{
		$res = categoryPeer::translateFieldName( $field_name , $this->field_name_translation_type , BasePeer::TYPE_COLNAME );
		return $res;
	}
<commit_msg>fwr: falcon - category batch + lock categories + partner features status<commit_after><?php
/**
 * @package Core
 * @subpackage model.filters
 */ 
class categoryFilter extends baseObjectFilter
{
	const FREE_TEXT_FIELDS = 'name,tags,description';
	
	public function init ()
	{
		// TODO - should separate the schema of the fields from the actual values
		// or can use this to set default valuse
		$this->fields = kArray::makeAssociativeDefaultValue ( array (
			"_eq_id",
			"_in_id",
			"_eq_parent_id",
			"_in_parent_id",
			"_eq_full_name",
			"_likex_full_name",
			"_in_full_name",
			"_eq_depth",
			"_gte_created_at",
			"_lte_created_at",
			"_free_text",
			"_in_members",
			"_gte_updated_at",
			"_lte_updated_at",
			"_like_tags",
			"_mlikeor_tags",
			"_mlikeand_tags",
			"_eq_appear_in_list",
			"_eq_privacy",
			"_in_privacy",
			"_eq_inheritance_type",
			"_in_inheritance_type",
			"_eq_status",
			"_in_status",
			"_gte_partner_sort_value",
			"_lte_partner_sort_value",
			"_likex_full_name",
			"_eq_full_ids",
			"_likex_full_ids",
			) , NULL );

		$this->allowed_order_fields = array ( "created_at" , "updated_at", "depth", "partner_sort_value", "entries_count", "members_count", "direct_entries_count");

		$this->aliases = array ( 
			"owner" => "kuser_id"
		);
	}

	public function describe() 
	{
		return 
			array (
				"display_name" => "CategoryFilter",
				"desc" => ""
			);
	}
	
	// TODO - move to base class, all that should stay here is the peer class, not the logic of the field translation !
	// The base class should invoke $peek_class::translateFieldName( $field_name , BasePeer::TYPE_FIELDNAME , BasePeer::TYPE_COLNAME );
	public function getFieldNameFromPeer ( $field_name )
	{
		$res = categoryPeer::translateFieldName( $field_name , $this->field_name_translation_type , BasePeer::TYPE_COLNAME );
		return $res;
	}

{'fraction_non_alphanumeric': 0.1286374762034267, 'fraction_numerical': 0.0, 'mean_word_length': 4.224431818181818, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5012456', 'n_tokens_mistral': 1516, 'n_tokens_neox': 1291, 'n_words': 269}