// Scan assigns a value from a database driver to the id.
Scan assigns a value from a database driver to the id.
// Scan assigns a value from a database driver to the id .
func (f *ID) Scan(src interface{}) (err error) {
	switch src := src.(type) {
	case int64:
		*f = ID(uint64(src))
	case []byte:
		*f, err = FromBytes(src)
	case nil:
		return nil
	default:
		return fmt.Errorf("incompatible type for flake id: %T", src)
	}
	return err
}
func ( f * ID ) Scan ( src interface { } ) ( err error ) { switch src := src . ( type ) { case int64 : * f = ID ( uint64 ( src ) ) case [ ] byte : * f , err = FromBytes ( src ) case nil : return nil default : return fmt . Errorf ( " " , src ) } return err }
Scan assigns a value from a database driver to the id.
Scan assigns a value from a database driver to the id .