GithubHelp home page GithubHelp logo

fluentquery's Introduction

Hey mate! πŸ‘‹

Welcome to my page, I have some interesting frameworks and libs written in Swift for you ⚑️

I'm programming since 2004, in mobile development since 2010, and in love with Swift since 2014 ❀️

Swift is my passion from its first release, so all my solutions are written in it 😊

Swift is great for iOS/macOS, Android, web, and server-side development πŸ’ͺ

  • πŸ”­ Currently working on SwifWeb and SwifDroid projects
  • πŸ“– Always learning
  • 🀝 Waiting for your PR into SwifWeb, SwifDroid, SwifQL, UIKitPlus, etc.
  • πŸ’¬ I’m always ready to help, find me in Discord as iMike#3049 or in Telegram as imike3049

Connect with me:

MihaelIsaev mihaelisaev 1001057 @imike

Work with me:

~01e0f70e7b012fe926

fluentquery's People

Contributors

calebkleveter avatar mihaelisaev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fluentquery's Issues

Unable to decode date

Hey there! In my PostgreSQL database I have two types of dates in the same column:

  • 2017-12-08 23:20:47.307779+01
  • 2017-09-29 02:00:00+02

One looks like to have milliseconds while the other one doesn't. Trying to decode this table from the database results in: FluentError.decodingError: The data couldn’t be read because it isn’t in the correct format. (Accessory nested model)

I tried digging into the FluentQuery codebase and I figured out that the following method returns nil:

override func date(from string: String) -> Date? {
        if let result = super.date(from: string) {
            return result
        }
        return OptionalFractionalSecondsDateFormatter.withoutSeconds.date(from: string)
    }

It seems that it's trying to decode the date with the withoutSeconds formatter and is failing. Do you know what's going on? Are you trying to decode the dates with both milliseconds and without to make sure it can be decoded correctly?
Thanks a lot!

Need to unwrap optionals in queries of optional KeyPaths

I have a class with an optional column, something like this:

final class SomeRecord: Codable, PostgreSQLModel, Content {
  // ...
  var string: String?
  // ...
}

Unfortunately because the column is optional, doing this:

let query = FQL().select("*").from(SomeRecord.self).where(\SomeRecord.string != "value")

results in this SQL:

SELECT * FROM _some_records_ WHERE "_some_records_"."string" != 'Optional("value")'

I have a suspicion of where the issue is occurring (the formatValue function in FQPredicate, in the String branch of the switch statement, or perhaps just the singleQuotted(v: Any) function which doesn't understand optionals) ...might open a PR to fix it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.