• Stars
    star
    6
  • Rank 2,456,300 (Top 50 %)
  • Language
    Elixir
  • License
    MIT License
  • Created about 9 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ecto.LazyFloat - An Ecto.Float that accepts binary and integers

Ecto.LazyFloat

Ecto.LazyFloat - An Ecto.Float that accepts binary and integers

Find on Hex - https://hex.pm/packages/ecto_lazy_float

Installation

Add Ecto.LazyFloat as a dependency in your mix.exs file.

defp deps do
  [{:postgrex, ">= 0.0.0"},
   {:ecto, "~> 0.7"},
   {:ecto_lazy_float, "~> 0.1.2"}]
end

After you are done, run mix deps.get in your shell to fetch the dependencies.

Usage

Enable LazyFloat through an Ecto model schema:

defmodule YourProject.Thing do
  use Ecto.Model

  schema "things" do
    field :notes, :string
    field :position, :integer
    field :value, Ecto.LazyFloat
  end
end
# With integer
valid = Ecto.Changeset.cast(%{value: 1}, %Thing{}, [], [])
Repo.insert(valid)

# With string
valid = Ecto.Changeset.cast(%{value: "1.2"}, %Thing{}, [], [])
Repo.insert(valid)

# With float
valid = Ecto.Changeset.cast(%{value: 1.2}, %Thing{}, [], [])
Repo.insert(valid)

More Repositories

1

DeckUI

Swift DSL for writing slide decks in Xcode
Swift
589
star
2

jsonapi-ios

A library for loading data from a JSON API datasource.
Objective-C
182
star
3

Sentry-Android

[Deprecated] Use official "raven-java" library
Java
180
star
4

jenkins-slack-command

Start a build in Jenkins using a Slack Command
Ruby
55
star
5

wassup

Easily scriptable terminal dashboard
Ruby
39
star
6

crunchygif

EZPZ VIDEO TO GIF CREATOR
Swift
34
star
7

fastlane-plugin-github_action

A plugin for setting up fastlane on GitHub Actions
Ruby
33
star
8

CropImageView

Super easy component for Android to crop an image
Java
33
star
9

connectkit-examples

21
star
10

NSDate-MinimalTimeAgo

NSDate category for very minimal style time ago
Objective-C
17
star
11

exportation

CLI tool of easy exporting/encrypting, and decrypting/importing of certificates and private keys
Ruby
17
star
12

ios-promises

[Deprecated] [Super no longer maintained] Objective-C implementation of jQuery-ish promises
Objective-C
17
star
13

LayoutOfRelativity

iOS relative layout rules
Objective-C
9
star
14

Notables-Swift

Protocol extensions for common NSNotifications for the lazy (me)
Swift
9
star
15

fastlane-plugin-queue

Queues for fastlane - with web interface 😱
Ruby
9
star
16

ionic-configurator

Configure Ionic (Cordova) config.xml files for individual environments using Mustache templating
JavaScript
8
star
17

swift-webframeworks-docker

Docker containers used for spinning up different Swift web frameworks
Swift
8
star
18

dotenv_to_ci

The laziest way to transfer environment variables from a .env file to a CI provider πŸ‘‹
Ruby
8
star
19

dotfiles

Vim Script
7
star
20

fastlane-plugin-rename_android_package

Ruby
7
star
21

wassup-swift

Wassup is a flexible and customizable dashboard for showing GitHub data.
Swift
7
star
22

ios-swift-test

Swift
7
star
23

chrome-circle-pr

Send a parameterized build to your CircleCI project from the push of a button while viewing your Pull Request on Github
JavaScript
7
star
24

fastlane-plugin-android_keystore

Generate an Android keystore file
Ruby
6
star
25

CircleShadowImageView

iOS UIImageView subclass for making a circle image with a shadow
Objective-C
6
star
26

jenkins-ironmq

Start a Jenkins job from an IronMQ message
Ruby
5
star
27

Protocol-Android

Java
5
star
28

JHSidebar

Objective-C
5
star
29

JHTableViewPullRefresh

Objective-C
3
star
30

RestCat

A RESTful library for iOS
Objective-C
3
star
31

hubby

Ruby
3
star
32

wassup-swift-releases

3
star
33

grandpa-kennys-fishing-adventure-early-access

3
star
34

raven-rust

Rust
2
star
35

circleci-orbs

CircleCI Orbs that make my life easier 😊
2
star
36

html-pager

HTML Pager
Ruby
2
star
37

fastlane-plugin-revenuecat

A fastlane plugin for interacting with the RevenueCat Developer API
Ruby
2
star
38

Trajectory

Android routing library
Java
2
star
39

PicPick

Java
2
star
40

shift

Application backend
JavaScript
2
star
41

liveedutv-obs-overlay

A LiveEdu.tv overlay for use in OBS (or other streaming application)
HTML
2
star
42

fastlane-plugin-install_android

Ruby
2
star
43

homeboy

JavaScript
1
star
44

joshdholtz

Ruby
1
star
45

slack-receipt-bot

Elixir
1
star
46

fastlane-plugin-bomb_emoji

πŸ’£ all the emojis in the fastlane output
Ruby
1
star
47

SlideyMenuGuy

Objective-C
1
star
48

NProgressIsh-iOS

NProgress like style progress bar for iOS
Objective-C
1
star
49

raycast-revenuecat

TypeScript
1
star
50

climbon-api

Swift
1
star
51

cupcakegram-ios

Swift
1
star
52

Protocol

Protocol
Objective-C
1
star
53

Protocol-iOS

Objective-C
1
star
54

JHAccordion

Objective-C
1
star
55

NavBarSwipeTitle

Objective-C
1
star
56

old_harmonic

A Swift library for loading JSON objects and arrays into Swift objects
Swift
1
star
57

yeah-buddy

JavaScript
1
star
58

ionic-configurator-example

CSS
1
star
59

star-wars-a-new-app

Swift
1
star
60

fastlane-plugin-testfairy

Upload an IPA to TestFairy
Ruby
1
star
61

KSCrash-Locking-Up-In-Swift-Example

KSCrash locks up in Swift but not in Objective-C (both example included)
C
1
star
62

Rekt-Swift

Functional approach to altering CGRect
Swift
1
star
63

Mockery-iOS

iOS Web Framework?? Not sure what to call this yet
Objective-C
1
star
64

storekit-config-file-demo

Demo app on how to use StoreKit Config File with RevenueCat and StoreKit 2
Swift
1
star
65

JustTransloadit-iOS

A simple to use Transloadit library
Objective-C
1
star
66

CLGeocoder-DoubleLookup

CLGeocoder+DoubleLookup - Give address components, get more address components back (like zip code)
Objective-C
1
star
67

test-repo-for-fastlane-plugin-github_action

Ruby
1
star
68

altconf-fastlane-best-practices

AltConf Lab Session Slides - fastlane Best Practices
CSS
1
star