BBloggsbott

joined 1 year ago
1
submitted 1 year ago* (last edited 1 year ago) by BBloggsbott to c/programming
 

I have multiple tables with the same schema. The only difference is the table name. Table names are in the format table_name_<tenant_id>, for example, table_name_1, table_name_24, table_name_15 etc.,

I want to use a single Entity and JPA repository to perform operations on this table. I get the tenant_id from the Request. I want to execute queries on the corresponding tables.

How do I dynamically set the table name to be used for querying?

We have only 5 such tables since the data for each tenant is very high

Not adding a MWE since I couldn't find any place to start trying approaches.

Edit: Replace user_id with tenant_id and add number of tables present

[–] BBloggsbott 1 points 1 year ago

Redditfugees really appreciate your efforts ❤️

[–] BBloggsbott 1 points 1 year ago

I have a PS4, but I prefer gaming on PC because it is more powerful that the PS4.

 

I was told that Jedi Survivor wasn't great on PC. Has it improved since its release? If I buy it now, can I play it without issues?

[–] BBloggsbott 2 points 1 year ago

GPVPL, a Visual programming language. There is no front end yet because I need to learn it and then build it 😅

[–] BBloggsbott 2 points 1 year ago* (last edited 1 year ago)

I felt the same. I am working on a new visual programming language (will be making it open-source) as a side project to kill time. I want it to be able to write any generic code. But I suck at front-end development so I was wondering if anyone would be interested in collaborating.

What I'm building can't show diffs or do commits (yet, these are good ideas), but you can extract the source code, share it and run it somewhere else.

The current state of the project is

  • It supports Int, String, Float, and Bool types
  • Arithmetic operations are supported
  • Variables can be assigned and used I am currently working on implementing Lists and Flow control (if/else and loops)

My vision(?) for this is to be a good place to learn and continue programming while also making it easy for the user to transition to a normal programming language like Java or Python. For the latter I am trying to achieve this by using very similar and in most cases, the exact same terminology and concepts for the design of the language.

I don't have a UI yet, but this is what the API call and the exported source code will look like

[
  {
    "description": "a = Int",
    "type": "Assignment",
    "name": "a",
    "value": {
      "type": "Int",
      "value": 30
    }
  },
  {
    "description": "b = Int",
    "type": "Assignment",
    "name": "b",
    "value": {
      "type": "Int",
      "value": 40
    }
  },
  {
    "description": "a + b",
    "type": "Plus",
    "left": {
      "type": "DefinedVariable",
      "name": "a"
    },
    "right": {
      "type": "DefinedVariable",
      "name": "b"
    }
  }
]
 

Do you think they can be powerful enough to build production-grade applications some day or are they going to stay as educational tools or build into specific applications forever?