docs.intersystems.com
ObjectScript Tutorial
Caché Objects and SQL
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Search:    

ObjectScript, as you'd guess from its name, also allows you to write code to access objects of classes; you might not guess that ObjectScript also allows you to write SQL queries to access rows in tables. A full discussion of classes, objects, properties, methods, and queries is beyond the scope of this tutorial. You can learn about these topics by trying one or more of our other tutorials. During this tutorial, we've been working with a database of Persons. You can think of an entry in the ^PersonD global as 1) a persistent object in the Person class, and 2) a row in the Person relational table. We'll now take a brief look at Caché Objects.
Using Studio, re-load the COS project from SAMPLES. In the Classes folder, in the CosTutorial package, you'll find a class called Person, with properties: Name, Phone, and DOB. This class will enable you to work with Person objects using a much simpler syntax. You won't have to think about pieces and delimiters anymore.


Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA