DataScript logo

DataScript Technical Notes


Technical notes on using DataScript.




DataScript AppleEvent Suite

Required Suite: Required suite of AppleEvents supported by DataScript

open: Open the Specified object(s)
open alias - - list of objects to open

print: Print the Specified object(s)
print alias - - list of objects to print

quit: Quit application
quit

run: Sent to an application when it is double-clicked
run


Core Suite: Core suite of AppleEvents supported by DataScript

count: Return the number of elements of a particular class within an object
count reference - - The object whose elements are to be counted
each type class - - The object class of the elements to be counted
Result: integer - - The number of object elements

delete: Delete an eletment from an object
delete reference - - The set of elements to delete

exists: Tell if an object exists
exists reference - - The set of objects to find
Result: boolean - - True if objects exists

get: Get the data for a set of objects
get reference - - The set of objects whose data is to be returned
as type class - - The desired type for the data
Result: anything - - A descriptor list containing data for the specified objects

make: Create a new element
make
new type class - - The object class of the element
[at location reference] - - The location at which to insert the object element
[with data anything] - - Initial data for the element
[with properties record] - - The initial data for the properties of the element
Result: reference - - The newly created element

set: Set an objects data
set reference - - The target for the 'set' command
to anything - - Data for the set of objects
Class application: Macintosh application object class
Elements:
connection by numeric index, by name, by ID, satisfying a test
Properties:
name string [r/o] - - Name of the application
id integer [r/o] - - Unique ID
frontmost boolean [r/o] - - Is this the foreground process ?
version string [r/o] - - Application version number
show dialogs boolean - - Show connection dialog ?

DataScript Suite: DataScript AppleEvents Suite

commit: Commits a transaction
commit query - - Query object

execute: Executes a query
execute query - - Query object

results of: Fetch query results
results of query - - Query object
[maximum rows small integer] - - Maximum number of rows to fetch
[treat blobs as string] - - Return 'long column' data as this type
Result: list - - Query results

rollback: Rolls back a transaction
rollback query - - Query object

Class connection: Connection to a database
Elements:
query by numeric index, by name, by ID, satisfying a test
Properties:
name string - - Logical name
id integer [r/o] - - Unique ID
database string [r/o] - - Database specification
user string [r/o] - - User identifier
password string [r/o] - - User authentification string

Class query: Query statement
Elements:
placeholder by numeric index, by name, by ID, satisfying a test
Properties:
name string - - Logical name
id integer [r/o] - - Unique ID
auto commit boolean [r/o] - - Issue a commit command after successfully executing a SQL statement ?
auto rollback boolean [r/o] - - Issue a rollback command after execution of a SQL statement fails ?

Class placeholder: Query statement placeholder variable
Properties:
name string - - Logical name
id integer [r/o] - - Unique ID



Other DataScript notes