Esempio n. 1
0
	def __init__(self,  stub, logger):
		"""PL/SQL anon block
		"""
		PL_SQL_ControlStatement.__init__(self, stub,logger)
		self._type='ANONYMOUS_BLOCK'
		self._src=None
		self._nested = False
		self._stub=stub
		self._logger=logger
		self._super=PL_SQL_ControlStatement
		pprint(stub)
		#sys.exit(1)
		if 'anonymous_block_body' in self._stub:
			self._src=self._stub['anonymous_block_body']
		else:
			if 'nested_block_body' in self._stub:
				self._src=self._stub['nested_block_body']
				self._nested=True
				self._type='NESTED_BLOCK'
			#self._statement_block = self._stub['statement_block']
		self._anon_block_map = None
		self._obj={} #control statements
		self._map={} #parsed objects' map
		self._map_src = None
		self._mvar={} #maintenance variable
		self._maint_var=''
		self._exc_map_src=None
		self._exc_obj=None
		self._exc_src=None
		self._has_exception=False
		if self._stub['exception']:
			self._has_exception=True
		self._exc_stub={}
		self._depth=None
Esempio n. 2
0
	def __init__(self,  stub,logger):
		"""PL/SQL exception case"""
		PL_SQL_ControlStatement.__init__(self, stub,logger)
		self._type='EXCEPTION_CASE'
		#self._logger=logger
		#self._stub={}
		self._name=None
		self._others=False # if it's OTHERS exception
		#pprint(dir(self._stub))
		if 'exception_name' in stub:
			self._name = stub['exception_name'].strip()
			if self._name.upper() == 'OTHERS':
				self._others=True
		self._src=None
		if 'exception_body' in stub:
			self._src=stub['exception_body'].strip()
		self._converted=False # if converted to others