import { Maybe } from '@terascope/types';

/**
 * The Vector Type, this will change how the data is stored and read
*/
export enum VectorType {
    /**
     * Currently this operates like String
     * but I imagine will be expanding it.
     * But will need to add format options
    */
    Date = 'Date',
    String = 'String',
    Int = 'Int',
    Float = 'Float',
    BigInt = 'BigInt',
    Boolean = 'Boolean',
    GeoPoint = 'GeoPoint',
    GeoJSON = 'GeoJSON',
    /** @todo */
    Object = 'Object',
    /**
     * Arbitrary data can be stored with this
    */
    Any = 'Any',
    /**
     * The list type is used for fields marked as Arrays
     * where each item in the Vector is a child element
    */
    List = 'List',
}

/**
 * A data type agnostic in-memory representation of the data
 * for a Vector and potential indices.
 * This should be generated by the builder.
*/
export type Data<T> = Readonly<{
    readonly values: readonly Maybe<T>[];
}>;

import { Maybe } from '@terascope/types';

/**
 * The Vector Type, this will change how the data is stored and read
 *
 * @todo add IP and IP_RANGE support
*/
export enum VectorType {
    /**
     * Currently this operates like String
     * but I imagine will be expanding it.
     * But will need to add format options
    */
    Date = 'Date',
    String = 'String',
    Int = 'Int',
    Float = 'Float',
    BigInt = 'BigInt',
    Boolean = 'Boolean',
    GeoPoint = 'GeoPoint',
    GeoJSON = 'GeoJSON',
    IP = 'IP',
    IP_RANGE = 'IP_RANGE',
    Object = 'Object',
    /**
     * Arbitrary data can be stored with this. Not recommended for use.
    */
    Any = 'Any',
    /**
     * The list type is used for fields marked as Arrays
     * where each item in the Vector is a child element
    */
    List = 'List',
}

/**
 * A data type agnostic in-memory representation of the data
 * for a Vector and potential indices.
 * This should be generated by the builder.
*/
export type Data<T> = Readonly<{
    readonly values: readonly Maybe<T>[];
}>;

Add todo for IP and IP_RANGE vectors
Add todo for IP and IP_RANGE vectors
