![]() |
Database objects
I don't know if this, or anything akin to this, is already possible... so excuse this post if it is. I propose a new type of object, database objects. These would be much like a spreadsheet, where you create a database, and can add/remove rows and columns.
NPC Code: and to access the database object: NPC Code: I was posting this as I went, so things might be disorganized, and it might not be the best design of commands and such, but I think you get the idea. If anyone has suggestions on what to add to this, go ahead. |
thats a good idea...
|
Good idea but I suggest using columns for fields and rows for entries.
|
MySQL support would be really nice.
|
Whats the point?
You can do: items.row1.bow = "whatever"; items.row1.somethingelse = "foo"; items.row2.bow = "..."; etc. This is LESS limited than your model because it's easier to set up and has the potential of different numbers of fields for each row. The only thing needed in a database object is a good querying method. If XPath were implemented we could have XML "databases". (Inefficient in larger systems, but for graal sized systems with probably less than 1000 records it'd be ok). |
Ya... except you have to create a different variable for every bit of information. This would contain all the information into one object.
|
PHP Code:
|
Well, the whole reason for this idea is to have one object to hold a lot of information in an organized way, and to have it easily accessible.
Instead of having a variable for every item(which gets annoying to go through), it would all be there in one easy-to-access database. I don't really understand the objection just because there are alternatives. There have been a lot of additions to Graal made just to make things easier. |
I'm only using ONE object - a TStaticVar.
|
Quote:
|
I designed a form database system earlier. Forms being arrays, first variable being the type so you can identify the other variables. Forms are saved automatically on change and send to clients that have them downloaded on change. This system is completely based off the one used for data in Morrowind and Oblivion. I however, decided not to use it for Val since I don't know how Graal would handle it if it gets large.
|
Well, I know something similar CAN be done, but that's besides the point. I think something like this would make a lot of things really simple. So why not?
|
Has everyone ignored the fact that databases themselves are objects? XD
|
Didn't somebody make a really complex GSSQL system? It was like a SQL database but made in GS2.
Ah found it: http://forums.graalonline.com/forums...ighlight=GSSQL |
There is already support for MySQL in Graal, it is not enabled for most servers though. Also the creation of tables, indices etc. cannot be done by Graal script directly.
|
| All times are GMT +2. The time now is 08:12 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.