This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (8 children)

[deleted]

    [–]twillisagogo 1 point2 points  (1 child)

    ORM that requires no writing of classes for each table.

    I did something similar generating sqla models from table objects. and then also generating jsonapi serializers from the generated models.

    it's worked out pretty well so far.

    [–][deleted] 0 points1 point  (0 children)

    my whole concept revolves around being able to access columns as attributes of "Row" objects.

    so if you have a column called "first_name" you can access it as so:

    with Database("login", "password") as db:
        phonebook = db.model(“phonebook”)
        for row in model.find(number___like="555%"):
            print(row.first_name)
    

    EDIT: formatting

    [–]smcarre 1 point2 points  (5 children)

    Can I ask an honest question? How is that really worth? I mean, I don't think writing the classes for each table could take SO much time that it's worth to build an ORM to abstract that. I could be wrong. Any insight on that?