Join the Facebook Group to discuss the tutorials. You can view the archives here.
To watch now, click on the image below:
If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.
Today's Smalltalk 4 You starts making use of of the Glorp code we wrote here. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:
If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.
You can also watch it on YouTube:
Today we'll start using our basic Glorp setup to insert and query data from Oracle. To start out, we need to login and get a session (this uses code we created in the last screencast).
Now we can create an instance and have it inserted into the database. In the code below, ou would normally use #register: - I used #registerAsNew: to ensure that Glorp would treat my object as a new one bound of the database:
It's worth looking at class GlorpSession for the full API range of what you can do; we'll be exploring some of that in future screencasts. Below are two images - a screencap of the inspector on the queried data, and a sqlplus wind showing the same thing:
Need more help? There's a screencast for other topics like this which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.
Welcome to episode 5 of "Thu'umcast" - a podcast where Michael Lucas-Smith, Scott Dirk, Austin Haley, Makahlua and I document our trials and tribulations in Elder Scrolls V: Skyrim
Today we were joined by Madjinn, who has logged an impressive number of hours in the game (averaging 10 per day since it was released :) ). We talked about some of the more glaring quest glitches (including the nasty one for Jagged Crown/Season Unending). We also talked about monster leveling, followers, and how we've been playing our characters.
If you liked our work on That Podcast, you'll probably like this. We intend to stay with the same idea - a gameplay podcast. If you don't want spoilers, don't listen - we are going to be talking about how we play the game, and what we ran across as we played.
Welcome to episode 5 of "Thu'umcast" - a podcast where Michael Lucas-Smith, Scott Dirk, Austin Haley, Makahlua and I document our trials and tribulations in Elder Scrolls V: Skyrim
Today we were joined by Madjinn, who has logged an impressive number of hours in the game (averaging 10 per day since it was released :) ). We talked about some of the more glaring quest glitches (including the nasty one for Jagged Crown/Season Unending). We also talked about monster leveling, followers, and how we've been playing our characters.
If you liked our work on That Podcast, you'll probably like this. We intend to stay with the same idea - a gameplay podcast. If you don't want spoilers, don't listen - we are going to be talking about how we play the game, and what we ran across as we played.
No podcast this weekend - too busy with the holiday and birthdays (the entire family has them this month, 2 right around Thanksgiving). We'll be back next week though, so stay tuned :)
Today's Smalltalk 4 You starts executing a few queries against the Emp table we created and mapped here. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:
If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.
You can also watch it on YouTube:
Today we'll execute some queries against Oracle using the descriptor we set up - see this video for details on that. First off, we inserted some data so that there would be something to query for:
"create a few more"
listOfEmps := OrderedCollection new.
1 to: 10 do: [:index | | newEmp |
newEmp := Emp new.
newEmp firstName: 'Wilma', index printString.
newEmp lastName: 'Flintstone', index printString.
listOfEmps add: newEmp
]
"insert them"
session beginUnitOfWork.
listOfEmps do: [:each | session registerAsNew: each].
session commitUnitOfWork.
Now we can execute a few queries. It's worth taking a look at class GlorpSession to get an idea as to the API that's being used here. First, the simplest query - you can #read: any class that's been described in a descriptor:
Those two queries do the same thing - you should see this if you inspect the results:
You can also include a where clause, but bear in mind the restrictions - in general, you are limited to code that:
accesses instance variables
compares instance variables using #=, #<, #>, #<>, #isNIL, #notNIL
Uses expressions in class ObjectExpression
Note that we use isNIL and notNIL rather than isNil and notNil; Glorp knows how to parse those and create valid SQL (which is what the where block becomes). Here are a few examples:
Note the use of #like:, which generates a SQL like statement. Use % rather than * for wildcarding, just as you would with SQL. For that last query, you should see the following results:
That wraps it up for now - we'll look at removing data next time
Need more help? There's a screencast for other topics like this which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.
Join the Facebook Group to discuss the tutorials. You can view the archives here.
To watch now, click on the image below:
If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.
It's going to be a tiring week, thanks to yesterday's travel awesome. It was a great flight - they boarded us, and just as the last people were sittingd own, they told us the plane was broken. Off we went, into a 3 hour delay. We left BWI just after 11 (which got us into Dallas after 1 AM). I finally got to the hotel after 2, and - gosh knows why - woke up a few minutes ago.