Exemple #1
0
 internal void ExportSet(int oid, byte[] data)
 {
     Btree btree = new Btree(data, ObjectHeader.Sizeof);
     storage.AssignOid(btree, oid);
     writer.Write(" <TenderBaseImpl.PersistentSet id=\"" + oid + "\">\n");
     btree.Export(this);
     writer.Write(" </TenderBaseImpl.PersistentSet>\n");
 }
Exemple #2
0
 internal void ExportIndex(int oid, byte[] data, string name)
 {
     Btree btree = new Btree(data, ObjectHeader.Sizeof);
     storage.AssignOid(btree, oid);
     writer.Write(" <" + name + " id=\"" + oid + "\" unique=\"" + (btree.unique ? '1' : '0') + "\" type=\"" + ClassDescriptor.signature[btree.type] + "\">\n");
     btree.Export(this);
     writer.Write(" </" + name + ">\n");
 }
Exemple #3
0
 internal void ExportMultiFieldIndex(int oid, byte[] data)
 {
     Btree btree = new Btree(data, ObjectHeader.Sizeof);
     storage.AssignOid(btree, oid);
     writer.Write(" <TenderBaseImpl.BtreeMultiFieldIndex id=\"" + oid + "\" unique=\"" + (btree.unique ? '1' : '0') + "\" class=");
     int offs = ExportString(data, Btree.Sizeof);
     int nFields = Bytes.Unpack4(data, offs);
     offs += 4;
     for (int i = 0; i < nFields; i++)
     {
         writer.Write(" field" + i + "=");
         offs = ExportString(data, offs);
     }
     writer.Write(">\n");
     int nTypes = Bytes.Unpack4(data, offs);
     offs += 4;
     compoundKeyTypes = new int[nTypes];
     for (int i = 0; i < nTypes; i++)
     {
         compoundKeyTypes[i] = Bytes.Unpack4(data, offs);
         offs += 4;
     }
     btree.Export(this);
     compoundKeyTypes = null;
     writer.Write(" </TenderBaseImpl.BtreeMultiFieldIndex>\n");
 }
Exemple #4
0
 internal void ExportFieldIndex(int oid, byte[] data)
 {
     Btree btree = new Btree(data, ObjectHeader.Sizeof);
     storage.AssignOid(btree, oid);
     writer.Write(" <TenderBaseImpl.BtreeFieldIndex id=\"" + oid + "\" unique=\"" + (btree.unique ? '1' : '0') + "\" class=");
     int offs = ExportString(data, Btree.Sizeof);
     writer.Write(" field=");
     offs = ExportString(data, offs);
     writer.Write(" autoinc=\"" + Bytes.Unpack8(data, offs) + "\">\n");
     btree.Export(this);
     writer.Write(" </TenderBaseImpl.BtreeFieldIndex>\n");
 }