 import Axis
+import Foundation
 
 public enum Value {
     case string(String)

    }
}

extension String: ValueConvertible {
    public init(rawSQLData buffer: Buffer) throws {
        try self.init(buffer: buffer)
    }

    public var sqlValue: Value {
        return .string(self)
    }
}

extension Buffer: ValueConvertible {
    public init(rawSQLData buffer: Buffer) throws {
        self = buffer
    }

    public var sqlValue: Value {
        return .buffer(self)
    }
}

    }
}

extension Buffer: ValueConvertible {
    public init(rawSQLData buffer: Buffer) throws {
        self = buffer
    }

    public var sqlValue: Value {
        return .buffer(self)
    }
}

extension String: ValueConvertible {
    public init(rawSQLData buffer: Buffer) throws {
        try self.init(buffer: buffer)
    }

    public var sqlValue: Value {
        return .string(self)
    }
}

extension Data : ValueConvertible {
    public init(rawSQLData buffer: Buffer) throws {
        self.init(buffer.bytes)
    }

    public var sqlValue: Value {
        return .buffer(Buffer(Array(self)))
    }
}

