⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 querytreenode.java

📁 derby database source code.good for you.
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
	 * @exception StandardException		Thrown on error	 */	public void init(Object arg1,						Object arg2,						Object arg3,						Object arg4) throws StandardException	{		if (SanityManager.DEBUG)		{			SanityManager.THROWASSERT("Four-argument init() not implemented for " + getClass().getName());		}	}	/**	 * Initialize a query tree node.	 *	 * @exception StandardException		Thrown on error	 */	public void init(Object arg1,						Object arg2,						Object arg3,						Object arg4,						Object arg5) throws StandardException	{		if (SanityManager.DEBUG)		{			SanityManager.THROWASSERT("Five-argument init() not implemented for " + getClass().getName());		}	}	/**	 * Initialize a query tree node.	 *	 * @exception StandardException		Thrown on error	 */	public void init(Object arg1,						Object arg2,						Object arg3,						Object arg4,						Object arg5,						Object arg6) throws StandardException	{		if (SanityManager.DEBUG)		{			SanityManager.THROWASSERT("Six-argument init() not implemented for " + getClass().getName());		}	}	/**	 * Initialize a query tree node.	 *	 * @exception StandardException		Thrown on error	 */	public void init(Object arg1,						Object arg2,						Object arg3,						Object arg4,						Object arg5,						Object arg6,						Object arg7) throws StandardException	{		if (SanityManager.DEBUG)		{			SanityManager.THROWASSERT("Seven-argument init() not implemented for " + getClass().getName());		}	}	/**	 * Initialize a query tree node.	 *	 * @exception StandardException		Thrown on error	 */	public void init(Object arg1,						Object arg2,						Object arg3,						Object arg4,						Object arg5,						Object arg6,						Object arg7,						Object arg8) throws StandardException	{		if (SanityManager.DEBUG)		{			SanityManager.THROWASSERT("Eight-argument init() not implemented for " + getClass().getName());		}	}	/**	 * Initialize a query tree node.	 *	 * @exception StandardException		Thrown on error	 */	public void init(Object arg1,						Object arg2,						Object arg3,						Object arg4,						Object arg5,						Object arg6,						Object arg7,						Object arg8,						Object arg9) throws StandardException	{		if (SanityManager.DEBUG)		{			SanityManager.THROWASSERT("Nine-argument init() not implemented for " + getClass().getName());		}	}	/**	 * Initialize a query tree node.	 *	 * @exception StandardException		Thrown on error	 */	public void init(Object arg1,						Object arg2,						Object arg3,						Object arg4,						Object arg5,						Object arg6,						Object arg7,						Object arg8,						Object arg9,						Object arg10) throws StandardException	{		if (SanityManager.DEBUG)		{			SanityManager.THROWASSERT("Ten-argument init() not implemented for " + getClass().getName());		}	}	/**	 * Initialize a query tree node.	 *	 * @exception StandardException		Thrown on error	 */	public void init(Object arg1,						Object arg2,						Object arg3,						Object arg4,						Object arg5,						Object arg6,						Object arg7,						Object arg8,						Object arg9,						Object arg10,						Object arg11) throws StandardException	{		if (SanityManager.DEBUG)		{			SanityManager.THROWASSERT("Eleven-argument init() not implemented for " + getClass().getName());		}	}	/**	 * Initialize a query tree node.	 *	 * @exception StandardException		Thrown on error	 */	public void init(Object arg1,						Object arg2,						Object arg3,						Object arg4,						Object arg5,						Object arg6,						Object arg7,						Object arg8,						Object arg9,						Object arg10,						Object arg11,						Object arg12) throws StandardException	{		if (SanityManager.DEBUG)		{			SanityManager.THROWASSERT("Twelve-argument init() not implemented for " + getClass().getName());		}	}	/**	 * Initialize a query tree node.	 *	 * @exception StandardException		Thrown on error	 */	public void init(Object arg1,						Object arg2,						Object arg3,						Object arg4,						Object arg5,						Object arg6,						Object arg7,						Object arg8,						Object arg9,						Object arg10,						Object arg11,						Object arg12,						Object arg13) throws StandardException	{		if (SanityManager.DEBUG)		{			SanityManager.THROWASSERT("Thirteen-argument init() not implemented for " + getClass().getName());		}	}	/**	 * Initialize a query tree node.	 *	 * @exception StandardException		Thrown on error	 */	public void init(Object arg1,						Object arg2,						Object arg3,						Object arg4,						Object arg5,						Object arg6,						Object arg7,						Object arg8,						Object arg9,						Object arg10,						Object arg11,						Object arg12,						Object arg13,						Object arg14) throws StandardException	{		if (SanityManager.DEBUG)		{			SanityManager.THROWASSERT("Fourteen-argument init() not implemented for " + getClass().getName());		}	}	public	TableName	makeTableName	(		String	schemaName,		String	flatName	)		throws StandardException	{		return (TableName) getNodeFactory().getNode			(				C_NodeTypes.TABLE_NAME,				schemaName,				flatName,				getContextManager()			);	}	public boolean isAtomic() throws StandardException	{		if (SanityManager.DEBUG)		{			SanityManager.THROWASSERT("isAtomic should not be called for this  class: " + getClass().getName());		}				return false;	}		public Object getCursorInfo() throws StandardException	{		return null;	}	/**	 * Get the descriptor for the named table within the given schema.	 * If the schema parameter is NULL, it looks for the table in the	 * current (default) schema. Table descriptors include object ids,	 * object types (table, view, etc.)	 * If the schema is SESSION, then before looking into the data dictionary	 * for persistent tables, it first looks into LCC for temporary tables.	 * If no temporary table tableName found for the SESSION schema, then it goes and	 * looks through the data dictionary for persistent table	 * We added getTableDescriptor here so that we can look for non data dictionary	 * tables(ie temp tables) here. Any calls to getTableDescriptor in data dictionary	 * should be only for persistent tables	 *	 * @param tableName	The name of the table to get the descriptor for	 * @param schema	The descriptor for the schema the table lives in.	 *			If null, use the current (default) schema.	 *	 * @return	The descriptor for the table, null if table does not	 *		exist.	 *	 * @exception StandardException		Thrown on failure	 */	protected final TableDescriptor getTableDescriptor(String tableName,					SchemaDescriptor schema)						throws StandardException	{		TableDescriptor retval;		//Following if means we are dealing with SESSION schema.		if (isSessionSchema(schema))		{			//First we need to look in the list of temporary tables to see if this table is a temporary table.			retval = getLanguageConnectionContext().getTableDescriptorForDeclaredGlobalTempTable(tableName);			if (retval != null)				return retval; //this is a temporary table		}		//Following if means we are dealing with SESSION schema and we are dealing with in-memory schema (ie there is no physical SESSION schema)		//If following if is true, it means SESSION.table is not a declared table & it can't be physical SESSION.table		//because there is no physical SESSION schema		if (schema.getUUID() == null)			return null;		//it is not a temporary table, so go through the data dictionary to find the physical persistent table		TableDescriptor td = getDataDictionary().getTableDescriptor(tableName, schema);		if (td == null || td.isSynonymDescriptor())			return null;		return td;	}	/**	 * Get the descriptor for the named schema. If the schemaName	 * parameter is NULL, it gets the descriptor for the current (default)	 * schema. Schema descriptors include authorization ids and schema ids.	 * SQL92 allows a schema to specify a default character set - we will	 * not support this.  Will check default schema for a match	 * before scanning a system table.	 * 	 * @param schemaName	The name of the schema we're interested in.	 *			If the name is NULL, get the descriptor for the	 *			current schema.	 *	 * @return	The descriptor for the schema.	 *	 * @exception StandardException		Thrown on error	 */	final SchemaDescriptor	getSchemaDescriptor(String schemaName)		throws StandardException	{		//return getSchemaDescriptor(schemaName, schemaName != null);		return getSchemaDescriptor(schemaName, true);	}	final SchemaDescriptor	getSchemaDescriptor(String schemaName, boolean raiseError)		throws StandardException	{		/*		** Check for a compilation context.  Sometimes		** there is a special compilation context in	 	** place to recompile something that may have		** been compiled against a different schema than		** the current schema (e.g views):	 	**	 	** 	CREATE SCHEMA x	 	** 	CREATE TABLE t		** 	CREATE VIEW vt as SEELCT * FROM t		** 	SET SCHEMA app		** 	SELECT * FROM X.vt 		**		** In the above view vt must be compiled against		** the X schema.		*/		SchemaDescriptor sd = null;		boolean isCurrent = false;		boolean isCompilation = false;		if (schemaName == null) {			CompilerContext cc = getCompilerContext();			sd = cc.getCompilationSchema();			if (sd == null) {				// Set the compilation schema to be the default,				// notes that this query has schema dependencies.				sd = getLanguageConnectionContext().getDefaultSchema();				isCurrent = true;				cc.setCompilationSchema(sd);			}			else			{				isCompilation = true;			}			schemaName = sd.getSchemaName();		}		DataDictionary dataDictionary = getDataDictionary();		SchemaDescriptor sdCatalog = dataDictionary.getSchemaDescriptor(schemaName,			getLanguageConnectionContext().getTransactionCompile(), raiseError);		if (isCurrent || isCompilation) {			if (sdCatalog != null)			{				// different UUID for default (current) schema than in catalog,				// so reset default schema.				if (!sdCatalog.getUUID().equals(sd.getUUID()))				{					if (isCurrent)						getLanguageConnectionContext().setDefaultSchema(sdCatalog);					getCompilerContext().setCompilationSchema(sdCatalog);				}			}			else			{				// this schema does not exist, so ensure its UUID is null.				sd.setUUID(null);				sdCatalog = sd;			}		}		return sdCatalog;	}	/**	 * Resolve table/view reference to a synonym. May have to follow a synonym chain.	 *	 * @param	tabName to match for a synonym	 *	 * @return	Synonym TableName if a match is found, NULL otherwise.	 *	 * @exception StandardException		Thrown on error	 */	public TableName resolveTableToSynonym(TableName tabName) throws StandardException	{		DataDictionary dd = getDataDictionary();		String nextSynonymTable = tabName.getTableName();		String nextSynonymSchema = tabName.getSchemaName();		boolean found = false;		CompilerContext cc = getCompilerContext();		// Circular synonym references should have been detected at the DDL time, so		// the following loop shouldn't loop forever.		for (;;)		{			SchemaDescriptor nextSD = getSchemaDescriptor(nextSynonymSchema, false);			if (nextSD == null || nextSD.getUUID() == null)				break;				AliasDescriptor nextAD = dd.getAliasDescriptor(nextSD.getUUID().toString(),						 nextSynonymTable, AliasInfo.ALIAS_NAME_SPACE_SYNONYM_AS_CHAR);			if (nextAD == null)				break;			/* Query is dependent on the AliasDescriptor */			cc.createDependency(nextAD);			found = true;			SynonymAliasInfo info = ((SynonymAliasInfo)nextAD.getAliasInfo());			nextSynonymTable = info.getSynonymTable();			nextSynonymSchema = info.getSynonymSchema();		}		if (!found)			return null;		TableName tableName = new TableName();		tableName.init(nextSynonymSchema, nextSynonymTable);		return tableName;	}	/**	 * 	 * @param javaClassName	The name of the java class to resolve.	 *	 * @param convertCase	whether to convert the case before resolving class alias.	 *	 * @return	Resolved class name or class alias name.	 *	 * @exception StandardException		Thrown on error	 */	String verifyClassExist(String javaClassName, boolean convertCase)		throws StandardException	{		/* Verify that the class exists */		ClassInspector classInspector = getClassFactory().getClassInspector();		/* We first try to resolve the javaClassName as a class.  If that		 * fails then we try to resolve it as a class alias.		 */		Throwable reason = null;		boolean foundMatch = false;		try {			foundMatch = classInspector.accessible(javaClassName);		} catch (ClassNotFoundException cnfe) {			reason = cnfe;		}		if (!foundMatch)			throw StandardException.newException(SQLState.LANG_TYPE_DOESNT_EXIST2, reason, javaClassName);		if (ClassInspector.primitiveType(javaClassName))			throw StandardException.newException(SQLState.LANG_TYPE_DOESNT_EXIST3, javaClassName);		return javaClassName;	}	/**	 * set the Information gathered from the parent table that is 	 * required to peform a referential action on dependent table.	 *	 * @return Nothing.	 */	public void setRefActionInfo(long fkIndexConglomId, 								 int[]fkColArray, 								 String parentResultSetId,								 boolean dependentScan)	{		if (SanityManager.DEBUG)		{			SanityManager.THROWASSERT(				"setRefActionInfo() not expected to be called for " +				getClass().getName());		}	}	/**		Add an authorization check into the passed in method.	*/	void generateAuthorizeCheck(ActivationClassBuilder acb,								MethodBuilder mb,								int sqlOperation) {		// add code to authorize statement execution.		acb.pushThisAsActivation(mb);		mb.callMethod(VMOpcode.INVOKEINTERFACE, null, "getLanguageConnectionContext",											 ClassName.LanguageConnectionContext, 0);		mb.callMethod(VMOpcode.INVOKEINTERFACE, null, "getAuthorizer",											 ClassName.Authorizer, 0);		mb.push(sqlOperation);		mb.callMethod(VMOpcode.INVOKEINTERFACE, null, "authorize",											 "void", 1);	}	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -