from .superutils import *
from .column import str_type

def counter_type_from_dtype(dtype, transient=True):
    if dtype == str_type:
        if transient:
            postfix = 'string'
        else:
            postfix = 'string' # view not support atm
    else:
        postfix = str(dtype)
        if postfix == '>f8':
            postfix = 'float64'
    name = 'counter_' + postfix
    return globals()[name]

def ordered_set_type_from_dtype(dtype, transient=True):
    if dtype == str_type:
        if transient:
            postfix = 'string'
        else:
            postfix = 'string' #  not support atm
    else:
        postfix = str(dtype)
        if postfix == '>f8':
            postfix = 'float64'
    name = 'ordered_set_' + postfix
    return globals()[name]

# from numpy import *
# import IPython
# IPython.embed()