Skip to content

EctoCastToString is a simple library that enables ecto casting from integer and float to string.

License

Notifications You must be signed in to change notification settings

luizParreira/ecto_cast_to_string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EctoCastToString

EctoCastIntToString is a simple library that enables ecto casting from number to string.

Installation

The package can be installed by adding :ecto_cast_to_string to your list of dependencies in mix.exs:

def deps do
  [{:ecto_cast_to_string, "~> 0.1.0"}]
end

Dependencies

As expected, EctoCastToString depends upon Ecto to work.

Usage

Simply set the type of the column you would like to have casted to string.

defmodule MyModel
  schema "my_model" do
    # Integer
    field :number_string, EctoCastToString.Number

    timestamps()
  end
end

License

EctoCastint is under MIT license. Check the LICENSE file for more details.

About

EctoCastToString is a simple library that enables ecto casting from integer and float to string.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages