
from . import IRField, IR_NULL_STRINGS, irNull

from ..compat_str import tobytes

class IRClassicField(IRField):
	'''
		IRClassicField - The IRField type which behaves like the "classic" IndexedRedis string-named fields.
		

		This will store and retrieve data encoding into the default encoding (@see IndexedRedis.compat_str.setDefaultIREncoding)

		and have a default value of empty string.
	'''

	CAN_INDEX = True

	def __init__(self, name='', hashIndex=False):
		IRField.__init__(self, name=name, hashIndex=hashIndex, defaultValue='')

	def __new__(self, name='', hashIndex=False):
		return IRField.__new__(self, name)


# vim: set ts=8 shiftwidth=8 softtabstop=8 noexpandtab :


from . import IRField, IR_NULL_STRINGS, irNull

from ..compat_str import tobytes, encoded_str_type

class IRClassicField(IRField):
	'''
		IRClassicField - The IRField type which behaves like the "classic" IndexedRedis string-named fields.
		

		This will store and retrieve data encoding into the default encoding (@see IndexedRedis.compat_str.setDefaultIREncoding)

		and have a default value of empty string.
	'''

	CAN_INDEX = True

	def __init__(self, name='', hashIndex=False):
		IRField.__init__(self, name=name, valueType=encoded_str_type, hashIndex=hashIndex, defaultValue='')

	def __new__(self, name='', hashIndex=False):
		return IRField.__new__(self, name)


# vim: set ts=8 shiftwidth=8 softtabstop=8 noexpandtab :

Change IRFieldClassic to use 'encoded_str_type'
Change IRFieldClassic to use 'encoded_str_type'

  
  from . import IRField, IR_NULL_STRINGS, irNull
  
- from ..compat_str import tobytes
+ from ..compat_str import tobytes, encoded_str_type
  
  class IRClassicField(IRField):
  	'''
  		IRClassicField - The IRField type which behaves like the "classic" IndexedRedis string-named fields.
  		
  
  		This will store and retrieve data encoding into the default encoding (@see IndexedRedis.compat_str.setDefaultIREncoding)
  
  		and have a default value of empty string.
  	'''
  
  	CAN_INDEX = True
  
  	def __init__(self, name='', hashIndex=False):
- 		IRField.__init__(self, name=name, hashIndex=hashIndex, defaultValue='')
+ 		IRField.__init__(self, name=name, valueType=encoded_str_type, hashIndex=hashIndex, defaultValue='')
  
  	def __new__(self, name='', hashIndex=False):
  		return IRField.__new__(self, name)
  
  
  # vim: set ts=8 shiftwidth=8 softtabstop=8 noexpandtab :
  
Change IRFieldClassic to use 'encoded_str_type'
## Code Before:

from . import IRField, IR_NULL_STRINGS, irNull

from ..compat_str import tobytes

class IRClassicField(IRField):
	'''
		IRClassicField - The IRField type which behaves like the "classic" IndexedRedis string-named fields.
		

		This will store and retrieve data encoding into the default encoding (@see IndexedRedis.compat_str.setDefaultIREncoding)

		and have a default value of empty string.
	'''

	CAN_INDEX = True

	def __init__(self, name='', hashIndex=False):
		IRField.__init__(self, name=name, hashIndex=hashIndex, defaultValue='')

	def __new__(self, name='', hashIndex=False):
		return IRField.__new__(self, name)


# vim: set ts=8 shiftwidth=8 softtabstop=8 noexpandtab :

## Instruction:
Change IRFieldClassic to use 'encoded_str_type'
## Code After:

from . import IRField, IR_NULL_STRINGS, irNull

from ..compat_str import tobytes, encoded_str_type

class IRClassicField(IRField):
	'''
		IRClassicField - The IRField type which behaves like the "classic" IndexedRedis string-named fields.
		

		This will store and retrieve data encoding into the default encoding (@see IndexedRedis.compat_str.setDefaultIREncoding)

		and have a default value of empty string.
	'''

	CAN_INDEX = True

	def __init__(self, name='', hashIndex=False):
		IRField.__init__(self, name=name, valueType=encoded_str_type, hashIndex=hashIndex, defaultValue='')

	def __new__(self, name='', hashIndex=False):
		return IRField.__new__(self, name)


# vim: set ts=8 shiftwidth=8 softtabstop=8 noexpandtab :
