simplified you could translate it to "lazy loading" if not in memory
more: http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GOBJ_persobj_swizzling
- Log in to post comments
simplified you could translate it to "lazy loading" if not in memory
more: http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GOBJ_persobj_swizzling
you need an oref in ref
and also in Myproperty1, ...
So you have to check both . see answer
you do
set ref=##class(myClass).%OpenId(id)
but you don't check if you really got an object. the id might be invalid
continue with
if '$isobject(ref) quit ""
the code causing the problem in MyClass.2.int looks most likely like this:
you are inside an ObjectMethod and miss the actual Object reference.
This happens when you try to access a property inside a Classmethod.
classic mistake:
correct use:
Whether external backup or backup from a mirror (also asynchronous) or Caché backup you always have to identify
the point in time when your DB is logically consistent. What I think of is no open transactions, no open dependencies.
If you know that point in time you could separate your async mirror or shadow and run any backup from there.
Or just shut down your async server instance and run snapshots.
But there might also be a time gap between master and async server.
Once completed your async server can join again and catch up whatever time that may take.
The critical point is to know when the async server has reached consistency.
But that depends on the application.
You are welcome!
Cheers rochdi
there is a method CopyFromStream that really moves the content to a new Stream
So your PDF moves from physical file to a Global stream that you work up and down as a "private" copy.
Without touching the original anymore. This might be a useful option.
for a file stream it's a physical file, for a global stream it's a global or part of it.
if you clear it you either delete the file or the global (or its part )that holds the stream.
stream in Caché describes a sequence of persistent bytes on disk that you work on with dedicated common methods.
this must not be mixed up with a stream of characters on a network connection. if you miss a character there it's gone.
Clear() removes all content. The easiest way to CLEAR a file is to remove it. in any file system.
"lightweight" is the theoretical approach for object purists that want to have just 1 object covering the world and don't care about practical use. They often were moaning "oh only 1.n relationship".
As you noted "heavy" allows real relation management. And could be faster in some cases.
Hi Alexey,
You hit the point: "lightweight" just documents the relation. Full stop. No further service.
You have to service (ie. Delete) it at both ends.
If you use a serial object with OREF + Status) you still have to service both ends.
The "heavy" variant does it centralized at one place.
Though from storage point of view you move out the additional subscript level from array.
Hi, Evegeny!
for both variants you work along the array by GetNext() method
for each employee you have an array with the OREFs of the company. So you have the full object at hands.
similar the opposite direction from company to employee and employee->nae in SQL or employee.name
And as we always have a Collection type Array indexing is simple either by (KEY) or (ELEMENT). whether you need the ID or the OREF
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GSQLOPT_indices#GSQLOPT_indices_collections
The only tricky action is DELETE: there you have to have a method to "DisRelate" before delete.
But real commercial systems never delete anything. Just set a flag "isDeleted". Which is much easier for any "undo" action.
It's a value returned from OS:
So this might be platform dependent.
the call is
the part for VMS deletes all versions of the file if the name is not terminated by " ;"
Congrats !![]()
First I would expect Soap.InboundAdapter writes to stream and has no limit.
But if longstrings are enabled the MAXsize of a %String is ~3.6 MB. Your description sounds to fit this.
You may look at your Adapter where the input goes.
But it might be also later processing of a stream to cause the problem.
doc say:
so try:
set success = file.Delete(File, .return)to see the reason for failing
You look for INSERT from Query
doc is here http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_insert#RSQL_insertselect
As far as I see it should work the way you have written
(assuming data types between target and source match)
To estimate runtime you may try the select count(*) from VwSrcTable first to get a feeling
how many records that will be.
Then during load running Select count(*) from DestTable from a 2nd session may let you see your progress.
pls. post your query in detail.
it's not obvious what you try to do.
SQLCODE -99 Privilege violation
You have 3 different sets of access rights in this scenario
Check if also your server has the required access rights at OS level.
under *IX it's quite likely that you don't run as root.
(though this happens also on other OS)
OMG CCUCL !
(OhMyGod CamelCaseUpperCaseLetters !).
Thanks, @Eduard.Lebedyuk . I never could have guessed it.
very convenient.
I like that!
It was first documented in 2015.2
chapter 12.1.1 p.108
http://docs.intersystems.com/documentation/cache/20152/pdfs/GSQL.pdf
• Dynamic SQL can accept a literal value input to a query in two ways: input parameters specified at execution time
using the “?” character, and input host variables (for example, :var) specified at prepare time. Embedded SQL uses
input and output host variables (for example, :var).
An interesting observation!
IT WORKS !
I just retyped it a little bit extended for fast retry:
It also works using traditional %ResultSet
Though I didn't interpret nor use it that way it is documented here:
Dynamic SQL versus Embedded SQL (4th point)
reason #1) 40 yrs. backward compatibility
#2) in $LB not everything is a string but has its hidden data types
while a string is sequence of bytes an integer get#s a binary representation ( ~ 19 digits ==> 8 byte (int64))
try:
it's really byte saving
In general I would agree:
Though in order to use the class query you have the change to namespace "%SYS" and back.
As the query is predefined you finally build your own lookup list which is a copy of the original global.
Anyhow this would provide the required result:
Strong agreement ![]()
![]()
![]()
32k sounds like the default size of Read() method in %Stream classes.
did you verify with ...stream.SizeGet() ?
http://docs.intersystems.com/iris20181/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25Stream.FileBinary#Read
so with a little change you get the content of CN= as starting string