Git Product home page Git Product logo

iluvadev / pocketbaseclient Goto Github PK

View Code? Open in Web Editor NEW
27.0 4.0 6.0 2.67 MB

C# client to interact with a particular PocketBase application: an ORM mapped to your PocketBase server. [This project is in active development. The things described below could change]

License: MIT License

C# 98.84% Batchfile 0.02% HTML 0.76% CSS 0.38%
code-generation csharp mapper netcore orm orm-framework pocketbase

pocketbaseclient's Issues

Number type always maps as int

The Number type in PocketBase maps to c# int type.
But:

  • Number accepts any real and natural value; values with or without decimals
  • int only accepts natural values in the range -2147483648 to 2147483647

With this mapping, there are no options to work with decimal values

Extend supported filters

Extend filters to support new PocketBase filters:

  • ?= Any/At least one of Equal
  • ?!= Any/At least one of NOT equal
  • ?> Any/At least one of Greater than
  • ?>= Any/At least one of Greater than or equal
  • ?< Any/At least one of Less than or equal
  • ?<= Any/At least one of Less than or equal
  • ?~ Any/At least one of Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for wildcard match)
  • ?!~ Any/At least one of NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for wildcard match)

Expand records

Support expand records when gets from PocketBase.

Something like:

filteredPosts.Expand(p => p.Author)

Update only changed properties

At now, when a property value is modified, the object is marked as modified with local changes.
The save operation updates all object.

Actually:

  • The entire object is saved
  • There is no track about changes, and do not know if really the object is changed: A property can be changed again to its initial value

Dealing with PocketBase fields with unexpected names

PocketBase allows field names that can not be translated correctly to Properties in C#:

  • _ -> Is translated to Empty string
  • __ -> Is translated to Empty string. Same PropertyName as _
  • 1 -> Is translated to "1", forbidden name for a Property
  • _1, 1_, _1_ -> All translated to "1", forbidden name for a Property. Same PropertyName as 1

And allows multiple fields that will be translated to the same Property name in C#:

  • field, _field, __field, _field_ -> All translated to same PropertyName: Field
  • my_field, my__field, _myField_, MyField -> All translated to same PropertyName: MyField

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.