# Path: spanner_orm/error.py
# class SpannerError(Exception):
# class ValidationError(Exception):


import abc
import base64
import binascii
import datetime
from typing import Any, Type
from google.cloud.spanner_v1.proto import type_pb2
from spanner_orm import error
  """Represents an integer type."""

  @staticmethod
  def ddl() -> str:
    return 'INT64'

  @staticmethod
  def grpc_type() -> type_pb2.Type:
    return type_pb2.Type(code=type_pb2.INT64)

  @staticmethod
  def validate_type(value: Any) -> None:
    if not isinstance(value, int):
      raise error.ValidationError('{} is not of type int'.format(value))


class Float(FieldType):
  """Represents a float type."""

  @staticmethod
  def ddl() -> str:
    return 'FLOAT64'

  @staticmethod
  def grpc_type() -> type_pb2.Type:
    return type_pb2.Type(code=type_pb2.FLOAT64)

  @staticmethod
  def validate_type(value: Any) -> None:
    if not isinstance(value, (int, float)):

# Path: spanner_orm/error.py
# class SpannerError(Exception):
# class ValidationError(Exception):


# Path: spanner_orm/field.py
import abc
import base64
import binascii
import datetime
from typing import Any, Type
from google.cloud.spanner_v1.proto import type_pb2
from spanner_orm import error

  """Represents an integer type."""

  @staticmethod
  def ddl() -> str:
    return 'INT64'

  @staticmethod
  def grpc_type() -> type_pb2.Type:
    return type_pb2.Type(code=type_pb2.INT64)

  @staticmethod
  def validate_type(value: Any) -> None:
    if not isinstance(value, int):
      raise error.ValidationError('{} is not of type int'.format(value))


class Float(FieldType):
  """Represents a float type."""

  @staticmethod
  def ddl() -> str:
    return 'FLOAT64'

  @staticmethod
  def grpc_type() -> type_pb2.Type:
    return type_pb2.Type(code=type_pb2.FLOAT64)

  @staticmethod
  def validate_type(value: Any) -> None:
    if not isinstance(value, (int, float)):

      raise error.ValidationError('{} is not of type float'.format(value))