anchor.diff:  				continue
   			else if(query.state != SDQL2_STATE_IDLE)
   				finished = FALSE
  -			else if(query.state == SDQL2_STATE_ERROR)
  -				if(usr)
  -					to_chat(usr, "<span class='admin'>SDQL query [query.get_query_text()] errored. It will NOT be automatically garbage collected. Please remove manually.</span>")
  -				running -= query
  +				if(query.state == SDQL2_STATE_ERROR)
  +					if(usr)
  +						to_chat(usr, "<span class='admin'>SDQL query [query.get_query_text()] errored. It will NOT be automatically garbage collected. Please remove manually.</span>")
  +					running -= query
   			else
   				if(query.finished)
   					objs_all += islist(query.obj_count_all)? length(query.obj_count_all) : query.obj_count_all
  
positive.code: 	if(!length(querys))
  		return
  	var/list/datum/SDQL2_query/running = list()
  	for(var/list/query_tree in querys)
  		var/datum/SDQL2_query/query = new /datum/SDQL2_query(query_tree)
  		if(QDELETED(query))
  			continue
  		if(usr)
  			query.show_next_to_key = usr.ckey
  		running += query
  		var/msg = "Starting query #[query.id] - [query.get_query_text()]."
  		if(usr)
  			to_chat(usr, "<span class='admin'>[msg]</span>")
  		log_admin(msg)
  		query.ARun()
  	var/finished = FALSE
  	var/objs_all = 0
  	var/objs_eligible = 0
  
negative.code: #define SDQL2_STATE_SWITCHING 5
  #define SDQL2_STATE_HALTING 6
  
  #define SDQL2_VALID_OPTION_TYPES list("proccall", "select", "priority", "autogc" , "sequential")
  #define SDQL2_VALID_OPTION_VALUES list("async", "blocking", "force_nulls", "skip_nulls", "high", "normal", "keep_alive" , "true")
  
  #define SDQL2_OPTION_SELECT_OUTPUT_SKIP_NULLS			(1<<0)
  #define SDQL2_OPTION_BLOCKING_CALLS						(1<<1)
  #define SDQL2_OPTION_HIGH_PRIORITY						(1<<2)		//High priority SDQL query, allow using almost all of the tick.
  #define SDQL2_OPTION_DO_NOT_AUTOGC						(1<<3)
  #define SDQL2_OPTION_SEQUENTIAL							(1<<4)
  
  #define SDQL2_OPTIONS_DEFAULT		(SDQL2_OPTION_SELECT_OUTPUT_SKIP_NULLS)
  
  