<jsp:directive.page pageEncoding="UTF-8" />
<!-- PostgreSQL 版 -->
<og:equals val1="{@DBF.NAME @DBID}" val2="POSTGRES">
  <og:query command="NEW" dbid="{@DBID}" debug="{@debug}" maxRowCount="0">
  </og:query>
</og:equals>

<!-- ORACLE 版 -->
<og:equals val1="{@DBF.NAME @DBID}" val2="ORACLE">
  <!-- FUNCTION,PACKAGE,PACKAGE BODY,PROCEDURE,TYPE,TYPE BODY,TRIGGER が対象 -->
  <og:query command="NEW" dbid="{@DBID}" debug="{@debug}" maxRowCount="0">
		select 'VIEW'		as OBJ_TYPE,
				VIEW_NAME	as OBJ_NAME,
				VIEW_NAME	as NAME_JA,
				0			as NOLINE ,
				'0'			as FGNG,
				TEXT		as SRC_TEXT ,
				'{@MEM.SYSTEM_ID}' AS SYSTEM_ID,
				'{@TBLSYU}' AS TBLSYU
		from USER_VIEWS
	<og:where>
		<og:and value="'VIEW' 	 =		'{@OBJ_TYPE2}'"	/>
		<og:and value="VIEW_NAME like	'{@OBJ_NAME}%'"	/>
	</og:where>
		order by 1,2,4,5
  </og:query>
</og:equals>

<!-- FIREBIRD 版 -->
<og:equals val1="{@DBF.NAME @DBID}" val2="FIREBIRD">
  <og:query command="NEW" dbid="{@DBID}" debug="{@debug}" maxRowCount="0">
	select 'VIEW'				as OBJ_TYPE,
			RDB$RELATION_NAME	as OBJ_NAME,
			RDB$RELATION_NAME	as NAME_JA,
			0					as NOLINE ,
			'0'					as FGNG,
			RDB$VIEW_SOURCE		as SRC_TEXT ,
			'{@MEM.SYSTEM_ID}' AS SYSTEM_ID,
			'{@TBLSYU}' AS TBLSYU
	from RDB$RELATIONS
	where RDB$SYSTEM_FLAG = 0
	and   RDB$VIEW_BLR is not null
	<og:where startKey="and">
		<og:and value="'VIEW'			=		'{@OBJ_TYPE2}'"	/>
		<og:and value="RDB$RELATION_NAME like	'{@OBJ_NAME}%'"	/>
	</og:where>
		order by 1,2,4,5
  </og:query>
</og:equals>
