# Copyright (c) 2026 Yuki Kimoto
# MIT License

class DBI::Data {
  version_from DBI;
  
  # Interfaces
  interface Stringable;

  # Enumerations
  enum {
    TYPE_ID_UNKNOWN = 0,
    TYPE_ID_BLOB    = 1,
    TYPE_ID_BIG_INT  = 2,
    TYPE_ID_BIG_FLOAT = 3,
  }

  # Fields
  has type_id : rw int;

  has value : rw string;

  # Class Methods
  static method new : DBI::Data () {
    return new DBI::Data;
  }

  # Instance Methods
  method to_string : string () {
    return $self->value;
  }
}
