[Opensim-dev] DB - NHibernate tests (part 1)

Impalah impalah at gmail.com
Thu Feb 7 10:02:29 UTC 2008


In opensim "in general" I don't know.
In the case of this example... it's just an example, you can change what you
need, the DB configuration is "transparent" for nhibernate.


2008/2/7, Kyle Hamilton <aerowolf at gmail.com>:
>
> Just out of curiosity... Is there a specific reason we're not using utf8
> unicode encoding for the tables?  Is there something that will break if utf8
> is used?
>
> -Kyle H
>
> Sent from my iPhone
>
> On Feb 7, 2008, at 1:40, Impalah <impalah at gmail.com> wrote:
>
> Sorry I made a mistake in the sql file.
>
> The good one is copied below.
>
> I'm working now on the "persistence" layer, creating the basic utilities (
> i.e. factories) and testing selects, updates and deletes.
>
> I hope in 2 or 3 days to have something "insertable" into the actual
> opensim.
>
>
>
> CREATE DATABASE `opensimtest` /*!40100 DEFAULT CHARACTER SET latin1 */;
>
> DROP TABLE IF EXISTS `opensimtest`.`osprimitive_type`;
> CREATE TABLE  `opensimtest`.`osprimitive_type` (
>   `id` int(10) unsigned NOT NULL auto_increment,
>   `name` varchar(45) NOT NULL,
>   `params` varchar(45) NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
>
>
> DROP TABLE IF EXISTS `opensimtest`.`ostexture`;
> CREATE TABLE  `opensimtest`.`ostexture` (
>   `id` int(10) unsigned NOT NULL auto_increment,
>   `uuid` varchar(45) NOT NULL,
>   `name` varchar(45) NOT NULL,
>   `path` varchar(45) NOT NULL,
>   `data` blob NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
>
> DROP TABLE IF EXISTS `opensimtest`.`osuser`;
> CREATE TABLE  `opensimtest`.`osuser` (
>   `id` int(10) unsigned NOT NULL auto_increment,
>   `uuid` varchar(45) NOT NULL,
>   `name` varchar(45) NOT NULL,
>   `surname` varchar(45) NOT NULL,
>   `last_position` varchar(45) NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
>
>
>
> DROP TABLE IF EXISTS `opensimtest`.`osfaces`;
> CREATE TABLE  `opensimtest`.`osfaces` (
>   `id` int(10) unsigned NOT NULL auto_increment,
>   `face` varchar(45) NOT NULL,
>   `id_texture` int(10) unsigned zerofill NOT NULL default '0000000000',
>   `params` varchar(45) NOT NULL,
>   PRIMARY KEY  (`id`),
>   KEY `FK_ostexture_faces_texture` (`id_texture`),
>   CONSTRAINT `FK_ostexture_faces_texture` FOREIGN KEY (`id_texture`)
> REFERENCES `ostexture` (`id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
>
> DROP TABLE IF EXISTS `opensimtest`.`osprimitive`;
> CREATE TABLE  `opensimtest`.`osprimitive` (
>   `id` int(10) unsigned NOT NULL auto_increment,
>   `name` varchar(45) default NULL,
>   `description` varchar(45) default NULL,
>   `uuid` varchar(45) NOT NULL,
>   `id_primitive_type` int(10) unsigned NOT NULL,
>   `id_creator` int(10) unsigned NOT NULL,
>   `id_owner` int(10) unsigned NOT NULL,
>   PRIMARY KEY  (`id`),
>   KEY `FK_osprimitive_type` (`id_primitive_type`),
>   KEY `FK_osprimitive_creator` (`id_creator`),
>   KEY `FK_osprimitive_owner` (`id_owner`),
>   CONSTRAINT `FK_osprimitive_type` FOREIGN KEY (`id_primitive_type`)
> REFERENCES `osprimitive_type` (`id`),
>   CONSTRAINT `FK_osprimitive_creator` FOREIGN KEY (`id_creator`)
> REFERENCES `osuser` (`id`),
>   CONSTRAINT `FK_osprimitive_owner` FOREIGN KEY (`id_owner`) REFERENCES
> `osuser` (`id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
>
>
>
>
>
> 2008/2/7, Sean Dague < <sean at dague.net>sean at dague.net>:
> >
> > On Wed, Feb 06, 2008 at 11:06:14PM +0100, Impalah wrote:
> > > Hi everyone:
> > >
> > > I've uploaded a file to my web page with a c# project testing
> > NHibernate:
> > >
> > <http://ai-designstudio.net/index.php?option=com_docman&task=doc_details&gid=40&Itemid=88889037&lang=en>
> > http://ai-designstudio.net/index.php?option=com_docman&task=doc_details&gid=40&Itemid=88889037&lang=en
> > >
> > > Please, does not expect a miracle right now, it's just only a massive
> > > insertion test for checking if everything runs ok.
> >
> > Thanks for all of this work.  I just pulled the source and am going to
> > poke it a bunch tomorrow.  More comments as I get up to speed on this.
> >
> >      -Sean
> >
> > --
> > __________________________________________________________________
> >
> > Sean Dague                                       Mid-Hudson Valley
> > sean at dague dot net                            Linux Users Group
> > <http://dague.net>http://dague.net
> > <http://mhvlug.org>http://mhvlug.org
> >
> > There is no silver bullet.  Plus, werewolves make better neighbors
> > than zombies, and they tend to keep the vampire population down.
> > __________________________________________________________________
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.6 (GNU/Linux)
> >
> > iD8DBQFHqnZgSamXem9TdyYRApuZAJ9dzX9sZn5CYb5GYu4xQkTRI6XWLACfTHxf
> > wditTaO4gROrub+bL0rPI2w=
> > =fqU2
> > -----END PGP SIGNATURE-----
> >
> > _______________________________________________
> > Opensim-dev mailing list
> > <Opensim-dev at lists.berlios.de>Opensim-dev at lists.berlios.de
> >  <https://lists.berlios.de/mailman/listinfo/opensim-dev>
> > https://lists.berlios.de/mailman/listinfo/opensim-dev
> >
> >
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080207/25ee1177/attachment-0001.html>


More information about the Opensim-dev mailing list