eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

215
active users

#orm

0 posts0 participants0 posts today

Working on an mini-oxm (orm and odm in one) in rust and tinkering on the way how entity data should be tunneled back to the caller. Normally this would be done by a simple generic but I want the Driver/Backends to be dyn-compatible so the decision which backend to use can be done at runtime.

Currently I have two prototyped designs:

  • Either a trait Row { fn try_get(&self, idx: &str) -> Result<&Box<dyn Any>, Error>; }, where each driver must encode the data into an custom row type and is thus memory bound, or
  • By an provider-consumer approach that uses two concurrent async tasks (tokio::spawn) and communicates by one shared Arc<Mutex<Option<Box<dyn Any>>>> slot that is blocked until the consumer has consumed it. This is light on memory but has the burden of requiring async (which is already required so no problem) but also a lot more of syncronsation code (Mutex, CondVar etc.)

So at the end it's the old problems of memory vs CPU time; choose one or the other, not both.... I could now microbenchmark it but both approaches will perform VERY differently based on context / environment / application, so benchmarking it dosnt give that much insight I think. Sure I could implement both based on an create feature (or directly let people choose via a low-level API) but would that benefit that users?

What's your opinion?

#rust#databases#orm

I wanted to use `models.IntegerChoices` for a field, but I have noticed when I add a new option it creates an additional migration. 🤨

If I do something like the screenshot, it kind of works? And no extra migration is created when I add a new option. However, it's messy and not DRY and I wish there was something better.

Am I missing something about IntegerChoices that would skip making a migration? Is there a better approach?

Top Online Reputation Management Company in Gurgaon - Digital Upshot

Boost your brand’s online presence and credibility with expert ORM services from Digital Upshot in Gurgaon. Safeguard your reputation with tailored solutions. #ORM #OnlineReputation #DigitalMarketing

digitalupshot.com/orm-seo/

Digital UpshotORM SEOWith content creation, link building, social media management, and online review management, you can trust us to provide ORM SEO solutions for maximal credibility.

Well I have this Medium account and never posted anything on it, so I decided to write up my littletable project. littletable was an experiment in ORMs that I started about 15 years ago, but it has really come in handy in dealing with small data sets and CSVs (up to a few thousand items). medium.com/@ptmcg/data-in-the- #python #orm #database #littletable

Medium · Data in the Small: Python package littletable combines in-memory NoSQL ORM with schemaless setupBy Paul McGuire

Amy #django #orm person:

How to convert the following to a QuerySet (I would love to have objects than values/dict)? #python

```
SELECT "containers_containerbase"."id",
"containers_containerbase"."cid",
"containers_containerbase"."cname",
MAX("containers_containerbase"."ctime")
FROM "containers_containerbase"
GROUP BY cname
```

Continued thread

At first I just wanted to play with some parts of the code like the ranking function. However it didn't take long before I decided that I wanted to build something more and, why not, play with some things I normally don't get to play with in #python like #async stuff and the #SQLAlchemy #ORM

Thus, winzig was born:
github.com/dnlzrgz/winzig

GitHubGitHub - dnlzrgz/winzig: A tiny search engine for personal use.A tiny search engine for personal use. Contribute to dnlzrgz/winzig development by creating an account on GitHub.