Comments (18)
If you want to validate table columns -- using Greyhound broker -- you can use Constraints.
See: https://github.com/mdbs99/Greyhound/blob/master/examples/table/t1.pas#L111
from brookframework.
Yes, i know, but the idea is to persist a tobject, the method "validate" is only an example, can be any method. :)
from brookframework.
Sorry, I don't get it, what would .Validate() do?
from brookframework.
Yes, i know, but the idea is to persist a tobject, the method "validate" is only an example, can be any method. :)
Persist a TObject? This is not possible... only if you use a subclass of TPersistent class and published properties.
Would be better if you explain what you want to do.
from brookframework.
Marcos da certo sim.
Estamos querendo converter TObject para JSON por RTTI, com isso aplicar na tabela o TObject direto.
English by google translator.
Mark's right yes.
We are trying to convert JSON to TObject for RTTI, apply it on the table with the direct TObject.
from brookframework.
Sorry, I don't get it, what would .Validate() do?
Validate()
is only a sample. I'll make a full demo to explain better my idea, that seems like "marshal" of Delphi: serialize and persists TObjects.
from brookframework.
For this you need TPersistent or use {$M+} directive on your classes that will be persisted
from brookframework.
For this you need TPersistent or use {$M+} directive on your classes that will be persisted
No. I'll show it, wait please...
from brookframework.
Hello buddies,
This is my initial idea:
http://brookframework.org/todo/xuxa-20130124-1442.zip
See it working:
1 - http://imagebin.org/244061;
2 - http://imagebin.org/244062; (UTF-8 is very nice too! ;) )
I.e, I will use my objects, their properties and methods, after, simply I serialize and persist it. This is my idea. ;)
from brookframework.
Hmm... does that mean the method should insert/update the object to data storage automatically?
from brookframework.
Yes. My doubt now is if I implement it direct in TBrookQuery or in a class helper.
ps. Update the field "weight" to "Numeric(9,2)", and in your browser, type "79,5" or "79.5", it allows comma or dot.
from brookframework.
I sent a question to the FPC-Devel:
http://lists.freepascal.org/lists/fpc-devel/2013-January/031003.html
from brookframework.
Michael implemented my suggestion about case insensitive en FPJSONRTTI: http://bugs.freepascal.org/view.php?id=23745.
from brookframework.
Hmm... I confuse me, sorry.
Well, the FPJSONRTTI unit (TJSONStreamer and TJSONDeStreamer classes) is doing the real job.
IHMO, the user can use it by themselves. Why put this in Brook?
But if you want anyway, do not put in BrookQuery.
from brookframework.
Well, the reason is the same as having a TBrookQuery, even the user already having a TSQLQuery.
from brookframework.
I think that I'll implement it in a class helper, then your use will be optional. Or, creating a new unit: BrookRTTIDBAction. And this unit would have some new implementations.
from brookframework.
Ok, feel free.
from brookframework.
Done. (b0f49c3)
from brookframework.
Related Issues (20)
- Why plugins projects on github to brookframework is closing? HOT 4
- Telegram plugin for brookframework HOT 15
- i18n HOT 4
- Version 4 ? HOT 14
- libbrook.pas in Source HOT 3
- tardigrade demos throwing errors in libbrook HOT 4
- Server requirements? HOT 4
- dopf & LastInsertID HOT 4
- httprouter.lpr throwing error HOT 2
- How am I supposed to free worker thread in brook daemon? HOT 9
- Use legacy application with tardigrade HOT 19
- CPU Activity is high for tardigrade projects BROOK4 HOT 4
- More documentation HOT 1
- Can't get POST request data HOT 13
- Brookframework with sagui (legacy) HOT 11
- HTTP Client HOT 1
- Where did the captcha plugin for 4.0 go? HOT 1
- Some suggestion about JTemplate? HOT 3
- [IDEA] New repository HOT 1
- EBrookHTTPServer: Failed to send data in request for HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brookframework.