public CursorDef(string name, string stmt, bool current, GxErrorMask nmask, bool hold,
                  IDataStoreHelper parent, Object[] parmBinds, short blockSize, int cachingCategory, bool hasNested,
                  bool isForFirst, string[] staticParameters) : this(name, stmt, current, nmask, hold, parent, parmBinds, blockSize,
                                                                     cachingCategory, hasNested, isForFirst)
 {
     _staticParameters = staticParameters;
 }
 public ServiceCursorDef(string name, object query, bool current, GxErrorMask nmask, bool hold,
                         IDataStoreHelper parent, Object[] parmBinds, short blockSize, int cachingCategory, bool hasNested,
                         bool isForFirst) : base(name, QueryId(name, query), current, nmask, hold, parent, parmBinds, blockSize,
                                                 cachingCategory, hasNested, isForFirst)
 {
     Query = query;
 }
 public CursorDef(string name, string stmt, bool current, GxErrorMask nmask, bool hold,
                  IDataStoreHelper parent, Object[] parmBinds, short blockSize, int cachingCategory, bool hasNested)
 {
     _name       = name;
     _stmt       = stmt;
     _nmask      = nmask;
     _parent     = parent;
     _parmBinds  = parmBinds;
     _blockSize  = blockSize;
     _timeToLive = (int)Preferences.CachingTTLs(cachingCategory);
     _hasNested  = hasNested;
 }
Example #4
0
 public DataStoreProvider(IGxContext context, IDataStoreHelper dataStoreHelper, Object[][] cursorParms)
 {
     GXLogging.Debug(log, "Start DataStoreProvider.Ctr, Parameters: handle '" + context.handle + "', dataStoreHelper:" + dataStoreHelper.GetType());
     _dataStoreHelper = dataStoreHelper;
     _context         = context;
     _ds = context.GetDataStore(dataStoreHelper.getDataStoreName());
     if (_ds == null)
     {
         _ds = new GxDataStore(new GxSqlServer(), dataStoreHelper.getDataStoreName(), context);
         context.AddDataStore(_ds);
         GXLogging.Error(log, dataStoreHelper.GetType() + " Datastore " + dataStoreHelper.getDataStoreName() + " not found in app config");
     }
     _ds.Handle   = context.handle;
     _cursor      = dataStoreHelper.getCursors();
     results      = cursorParms;
     errorBuffers = new Dictionary <int, Object[]>();
     if (Preferences.Instrumented)
     {
         wmiDataStoreProvider = WMIDataStoreProviders.Instance().AddDataStoreProvider(dataStoreHelper.GetType().ToString());
     }
     dataStoreRequestCount++;
 }
 public ForEachCursor(CursorDef def) : base(def.Name, def.Stmt, def.Nmask, def.ParmBinds, def.BlockSize, def.TimeToLive, def.HasNested, def.IsForFirst, def.getDynamicOrder())
 {
     dynamicStmt = def.Stmt.Length == 7 && def.Stmt.ToLower().Equals("scmdbuf");
     parent      = def.Parent;
     _cursorDef  = def;
 }