001package gudusoft.gsqlparser.resolver2.scope; 002 003import gudusoft.gsqlparser.resolver2.namespace.INamespace; 004import gudusoft.gsqlparser.resolver2.model.ResolvePath; 005 006import java.util.List; 007 008/** 009 * Callback interface for collecting resolution results. 010 * Used during name resolution to gather all possible matches. 011 * 012 * This interface allows for collecting multiple candidates 013 * when a name is ambiguous. 014 */ 015public interface IResolved { 016 017 /** 018 * Called when a namespace is found that matches the name being resolved. 019 * 020 * @param namespace The namespace that was found 021 * @param nullable Whether the namespace is nullable (e.g., from LEFT JOIN) 022 * @param scope The scope where it was found 023 * @param path The resolution path taken 024 * @param remainingNames Names that weren't consumed in resolution 025 */ 026 void found(INamespace namespace, 027 boolean nullable, 028 IScope scope, 029 ResolvePath path, 030 List<String> remainingNames); 031 032 /** 033 * Get the number of matches found 034 */ 035 int getCount(); 036 037 /** 038 * Check if exactly one match was found 039 */ 040 boolean isUnique(); 041 042 /** 043 * Check if multiple matches were found (ambiguous) 044 */ 045 boolean isAmbiguous(); 046 047 /** 048 * Check if no matches were found 049 */ 050 boolean isEmpty(); 051}